mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Fix a couple of clang warnings. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4697 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
eed56532a8
commit
384aec522a
8 changed files with 30 additions and 20 deletions
|
@ -89,8 +89,8 @@ extern char inputdevices;
|
|||
#define NUMKEYS 256
|
||||
#define KEYSTATUSSIZ 256
|
||||
#define KEYFIFOSIZ 64
|
||||
extern char keystatus[KEYSTATUSSIZ], keyfifo[KEYFIFOSIZ], keyfifoplc, keyfifoend;
|
||||
extern char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend;
|
||||
extern char keystatus[KEYSTATUSSIZ], keyfifo[KEYFIFOSIZ], keyasciififo[KEYFIFOSIZ];
|
||||
extern uint8_t keyasciififoplc, keyasciififoend, keyfifoplc, keyfifoend;
|
||||
extern char scantoasc[128], remap[KEYSTATUSSIZ], key_names[NUMKEYS][24];
|
||||
extern int32_t remapinit;
|
||||
|
||||
|
|
|
@ -44,10 +44,12 @@
|
|||
# define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
|
||||
#endif
|
||||
|
||||
#ifndef UNREFERENCED_PARAMETER
|
||||
#define UNREFERENCED_PARAMETER(x) x=x
|
||||
#ifdef UNREFERENCED_PARAMETER
|
||||
#undef UNREFERENCED_PARAMETER
|
||||
#endif
|
||||
|
||||
#define UNREFERENCED_PARAMETER(x) x = x
|
||||
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
# define ATTRIBUTE(attrlist) __attribute__(attrlist)
|
||||
#else
|
||||
|
@ -582,7 +584,15 @@ static inline uint16_t system_15bit_rand(void) { return ((uint16_t)rand())&0x7ff
|
|||
# define Bcalloc calloc
|
||||
# define Brealloc realloc
|
||||
# define Bfree free
|
||||
#ifdef __cplusplus
|
||||
# define Bstrdup _strdup
|
||||
# define Bchdir _chdir
|
||||
# define Bgetcwd _getcwd
|
||||
#else
|
||||
# define Bstrdup strdup
|
||||
# define Bchdir chdir
|
||||
# define Bgetcwd getcwd
|
||||
#endif
|
||||
# define Bmemalign memalign
|
||||
# define Bopen open
|
||||
# define Bclose close
|
||||
|
@ -680,7 +690,6 @@ static inline uint16_t system_15bit_rand(void) { return ((uint16_t)rand())&0x7ff
|
|||
# define Bvsnprintf vsnprintf
|
||||
# endif
|
||||
# define Bvfprintf vfprintf
|
||||
# define Bgetcwd getcwd
|
||||
# define Bgetenv getenv
|
||||
# define Btime() time(NULL)
|
||||
# define Butime utime
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
// input
|
||||
char inputdevices=0;
|
||||
char keystatus[KEYSTATUSSIZ], keyfifo[KEYFIFOSIZ], keyfifoplc, keyfifoend;
|
||||
char keyasciififo[KEYFIFOSIZ], keyasciififoplc, keyasciififoend;
|
||||
char keystatus[KEYSTATUSSIZ], keyfifo[KEYFIFOSIZ], keyasciififo[KEYFIFOSIZ];
|
||||
uint8_t keyfifoplc, keyfifoend, keyasciififoplc, keyasciififoend;
|
||||
char remap[KEYSTATUSSIZ];
|
||||
int32_t remapinit=0;
|
||||
char key_names[NUMKEYS][24];
|
||||
|
|
|
@ -10695,7 +10695,7 @@ void test_map(int32_t mode)
|
|||
if ((program_origcwd[0] == '\0') || !getcwd(current_cwd, BMAX_PATH))
|
||||
current_cwd[0] = '\0';
|
||||
else // Before we check if file exists, for the case there's no absolute path.
|
||||
chdir(program_origcwd);
|
||||
Bchdir(program_origcwd);
|
||||
|
||||
fp = fopen(game_executable, "rb"); // File exists?
|
||||
if (fp != NULL)
|
||||
|
@ -10719,7 +10719,7 @@ void test_map(int32_t mode)
|
|||
}
|
||||
|
||||
if (current_cwd[0] != '\0') // Temporarily changing back,
|
||||
chdir(current_cwd); // after checking if file exists.
|
||||
Bchdir(current_cwd); // after checking if file exists.
|
||||
|
||||
if (testplay_addparam)
|
||||
slen = Bstrlen(testplay_addparam);
|
||||
|
@ -10765,10 +10765,10 @@ void test_map(int32_t mode)
|
|||
#else
|
||||
if (current_cwd[0] != '\0')
|
||||
{
|
||||
chdir(program_origcwd);
|
||||
Bchdir(program_origcwd);
|
||||
if (system(fullparam))
|
||||
message("Error launching the game!");
|
||||
chdir(current_cwd);
|
||||
Bchdir(current_cwd);
|
||||
}
|
||||
else system(fullparam);
|
||||
#endif
|
||||
|
|
|
@ -97,7 +97,7 @@ void *Bmalloc(bsize_t size)
|
|||
|
||||
void Bfree(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
Bfree(ptr);
|
||||
}
|
||||
|
||||
int32_t Bopen(const char *pathname, int32_t flags, uint32_t mode)
|
||||
|
|
|
@ -157,11 +157,12 @@
|
|||
/**************************************
|
||||
Memory routines
|
||||
**************************************/
|
||||
#include "compat.h"
|
||||
#include <stdlib.h> /* malloc, calloc, free */
|
||||
#define ALLOCATOR(n,s) calloc(n,s)
|
||||
#define FREEMEM free
|
||||
#define ALLOCATOR(n,s) Xcalloc(n,s)
|
||||
#define FREEMEM Bfree
|
||||
#include <string.h> /* memset, memcpy */
|
||||
#define MEM_INIT memset
|
||||
#define MEM_INIT Bmemset
|
||||
|
||||
|
||||
/**************************************
|
||||
|
|
|
@ -352,7 +352,7 @@ void G_ExtInit(void)
|
|||
else asperr = -1;
|
||||
}
|
||||
if (asperr == 0)
|
||||
chdir(cwd);
|
||||
Bchdir(cwd);
|
||||
Bfree(homedir);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11021,15 +11021,15 @@ static void G_Startup(void)
|
|||
|
||||
if (g_modDir[0] != '/' && (cwd = getcwd(NULL, 0)))
|
||||
{
|
||||
chdir(g_modDir);
|
||||
Bchdir(g_modDir);
|
||||
if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
||||
{
|
||||
chdir(cwd);
|
||||
Bchdir(cwd);
|
||||
if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
||||
G_GameExit("Failed loading art.");
|
||||
}
|
||||
chdir(cwd);
|
||||
free(cwd);
|
||||
Bchdir(cwd);
|
||||
Bfree(cwd);
|
||||
}
|
||||
else if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
||||
G_GameExit("Failed loading art.");
|
||||
|
|
Loading…
Reference in a new issue