Browse Source

Make a function return const; More mingw fixes

tags/v1.9.15
falkTX 1 year 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
#include <process.h>
#include "JackPlatformPlug_os.h"
#endif


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

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

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

#else
char* JackTools::UserDir()
const char* JackTools::UserDir()
{
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() */
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,
* 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,
(lstrlen((LPCTSTR)lpMsgBuf) + lstrlen((LPCTSTR)so_name) + 40) * 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);



+ 2
- 2
common/JackTools.h View File

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

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 void CleanupFiles(const char* server_name);
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
static jack_shm_info_t registry_info = {/* SHM info for the registry */
JACK_SHM_NULL_INDEX,
NULL
0,
{ NULL }
};
#else
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
jack_remove_shm (jack_shm_id_t id)
jack_remove_shm (const jack_shm_id_t id)
{
/* nothing to do */
}


Loading…
Cancel
Save