Browse Source

Make a function return const; More mingw fixes

tags/v1.9.15
falkTX 4 years ago
parent
commit
bcdca517ad
3 changed files with 11 additions and 9 deletions
  1. +6
    -5
      common/JackTools.cpp
  2. +2
    -2
      common/JackTools.h
  3. +3
    -2
      common/shm.c

+ 6
- 5
common/JackTools.cpp View File

@@ -28,6 +28,7 @@


#ifdef WIN32 #ifdef WIN32
#include <process.h> #include <process.h>
#include "JackPlatformPlug_os.h"
#endif #endif




@@ -87,12 +88,12 @@ namespace Jack {
/* returns the name of the per-user subdirectory of jack_tmpdir */ /* returns the name of the per-user subdirectory of jack_tmpdir */
#ifdef WIN32 #ifdef WIN32


char* JackTools::UserDir()
const char* JackTools::UserDir()
{ {
return ""; return "";
} }


char* JackTools::ServerDir(const char* server_name, char* server_dir)
const char* JackTools::ServerDir(const char* server_name, char* server_dir)
{ {
return ""; return "";
} }
@@ -105,7 +106,7 @@ namespace Jack {
} }


#else #else
char* JackTools::UserDir()
const char* JackTools::UserDir()
{ {
static char user_dir[JACK_PATH_MAX + 1] = ""; static char user_dir[JACK_PATH_MAX + 1] = "";


@@ -122,7 +123,7 @@ namespace Jack {
} }


/* returns the name of the per-server subdirectory of jack_user_dir() */ /* returns the name of the per-server subdirectory of jack_user_dir() */
char* JackTools::ServerDir(const char* server_name, char* server_dir)
const char* JackTools::ServerDir(const char* server_name, char* server_dir)
{ {
/* format the path name into the suppled server_dir char array, /* format the path name into the suppled server_dir char array,
* assuming that server_dir is at least as large as JACK_PATH_MAX + 1 */ * assuming that server_dir is at least as large as JACK_PATH_MAX + 1 */
@@ -263,7 +264,7 @@ void PrintLoadError(const char* so_name)
lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT, lpDisplayBuf = (LPVOID)LocalAlloc(LMEM_ZEROINIT,
(lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)so_name) + 40) * sizeof(TCHAR)); (lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)so_name) + 40) * sizeof(TCHAR));
_snprintf((LPTSTR)lpDisplayBuf, LocalSize(lpDisplayBuf) / sizeof(TCHAR), _snprintf((LPTSTR)lpDisplayBuf, LocalSize(lpDisplayBuf) / sizeof(TCHAR),
TEXT("error loading %s err = %s"), so_name, lpMsgBuf);
TEXT("error loading %s err = %s"), so_name, (LPCTSTR)lpMsgBuf);


jack_error((LPCTSTR)lpDisplayBuf); jack_error((LPCTSTR)lpDisplayBuf);




+ 2
- 2
common/JackTools.h View File

@@ -60,8 +60,8 @@ namespace Jack
static void KillServer(); static void KillServer();


static int MkDir(const char* path); static int MkDir(const char* path);
static char* UserDir();
static char* ServerDir(const char* server_name, char* server_dir);
static const char* UserDir();
static const char* ServerDir(const char* server_name, char* server_dir);
static const char* DefaultServerName(); static const char* DefaultServerName();
static void CleanupFiles(const char* server_name); static void CleanupFiles(const char* server_name);
static int GetTmpdir(); static int GetTmpdir();


+ 3
- 2
common/shm.c View File

@@ -114,7 +114,8 @@ static jack_shm_id_t registry_id; /* SHM id for the registry */
#ifdef WIN32 #ifdef WIN32
static jack_shm_info_t registry_info = {/* SHM info for the registry */ static jack_shm_info_t registry_info = {/* SHM info for the registry */
JACK_SHM_NULL_INDEX, JACK_SHM_NULL_INDEX,
NULL
0,
{ NULL }
}; };
#else #else
static jack_shm_info_t registry_info = { /* SHM info for the registry */ static jack_shm_info_t registry_info = { /* SHM info for the registry */
@@ -1020,7 +1021,7 @@ jack_create_registry (jack_shm_info_t *ri)
} }


static void static void
jack_remove_shm (jack_shm_id_t id)
jack_remove_shm (const jack_shm_id_t id)
{ {
/* nothing to do */ /* nothing to do */
} }


Loading…
Cancel
Save