From 3b5dea7347a766ee3c8a238dd2e830d7619efd7c Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 10 Feb 2014 11:00:07 +0000 Subject: [PATCH] Fix warnings when building in C++11 mode, i.e. with CPLUSPLUS=1 CUSTOMOPT="--std=gnu++11". git-svn-id: https://svn.eduke32.com/eduke32@4321 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/engine.c | 14 +++++++------- polymer/eduke32/build/src/engine_priv.h | 10 +++++----- polymer/eduke32/source/astub.c | 20 ++++++++++---------- polymer/eduke32/source/duke3d.h | 2 +- polymer/eduke32/source/game.c | 2 +- polymer/eduke32/source/gamevars.c | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 65ba48bff..b61b50f1a 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -2135,15 +2135,15 @@ static inline int32_t getkensmessagecrc(void *b) "movl %%eax, %%ebx\n\t" \ "jnz 0f\n\t" \ "shrl $12, %%ebx\n\t" \ - "movw "ASMSYM("shlookup")"(,%%ebx,2), %%cx\n\t" \ + "movw " ASMSYM("shlookup") "(,%%ebx,2), %%cx\n\t" \ "jmp 1f\n\t" \ "0:\n\t" \ "shrl $24, %%ebx\n\t" \ - "movw ("ASMSYM("shlookup")"+8192)(,%%ebx,2), %%cx\n\t" \ + "movw (" ASMSYM("shlookup") "+8192)(,%%ebx,2), %%cx\n\t" \ "1:\n\t" \ "shrl %%cl, %%eax\n\t" \ "movb %%ch, %%cl\n\t" \ - "movw "ASMSYM("sqrtable")"(,%%eax,2), %%ax\n\t" \ + "movw " ASMSYM("sqrtable") "(,%%eax,2), %%ax\n\t" \ "shrl %%cl, %%eax" \ : "=a" (__r) : "a" (__a) : "ebx", "ecx", "cc"); \ __r; }) @@ -2173,11 +2173,11 @@ static inline int32_t getkensmessagecrc(void *b) #define krecipasm(a) \ ({ int32_t __a=(a); \ __asm__ __volatile__ ( \ - "movl %%eax, ("ASMSYM("fpuasm")"); fildl ("ASMSYM("fpuasm")"); " \ - "addl %%eax, %%eax; fstps ("ASMSYM("fpuasm")"); sbbl %%ebx, %%ebx; " \ - "movl ("ASMSYM("fpuasm")"), %%eax; movl %%eax, %%ecx; " \ + "movl %%eax, (" ASMSYM("fpuasm") "); fildl (" ASMSYM("fpuasm") "); " \ + "addl %%eax, %%eax; fstps (" ASMSYM("fpuasm") "); sbbl %%ebx, %%ebx; " \ + "movl (" ASMSYM("fpuasm") "), %%eax; movl %%eax, %%ecx; " \ "andl $0x007ff000, %%eax; shrl $10, %%eax; subl $0x3f800000, %%ecx; " \ - "shrl $23, %%ecx; movl "ASMSYM("reciptable")"(%%eax), %%eax; " \ + "shrl $23, %%ecx; movl " ASMSYM("reciptable") "(%%eax), %%eax; " \ "sarl %%cl, %%eax; xorl %%ebx, %%eax" \ : "=a" (__a) : "a" (__a) : "ebx", "ecx", "memory", "cc"); \ __a; }) diff --git a/polymer/eduke32/build/src/engine_priv.h b/polymer/eduke32/build/src/engine_priv.h index ff0ddc9cb..92bd2d106 100644 --- a/polymer/eduke32/build/src/engine_priv.h +++ b/polymer/eduke32/build/src/engine_priv.h @@ -173,16 +173,16 @@ skipit: ({ int32_t __a=(a); \ __asm__ __volatile__ ( \ "movl %%eax, %%ebx\n\t" \ - "cmpb $200, "ASMSYM("walock")"(%%eax)\n\t" \ + "cmpb $200, " ASMSYM("walock") "(%%eax)\n\t" \ "jae 0f\n\t" \ - "movb $199, "ASMSYM("walock")"(%%eax)\n\t" \ + "movb $199, " ASMSYM("walock") "(%%eax)\n\t" \ "0:\n\t" \ "shrl $3, %%eax\n\t" \ "andl $7, %%ebx\n\t" \ - "movb "ASMSYM("gotpic")"(%%eax), %%dl\n\t" \ - "movb "ASMSYM("pow2char")"(%%ebx), %%bl\n\t" \ + "movb " ASMSYM("gotpic") "(%%eax), %%dl\n\t" \ + "movb " ASMSYM("pow2char") "(%%ebx), %%bl\n\t" \ "orb %%bl, %%dl\n\t" \ - "movb %%dl, "ASMSYM("gotpic")"(%%eax)" \ + "movb %%dl, " ASMSYM("gotpic") "(%%eax)" \ : "=a" (__a) : "a" (__a) \ : "ebx", "edx", "memory", "cc"); \ __a; }) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index d8af630e1..e86bd6335 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -895,7 +895,7 @@ int32_t taglab_save(const char *mapname) if (!label) continue; - len = Bsprintf(buf, "%d %s"OURNEWL, i, label); + len = Bsprintf(buf, "%d %s" OURNEWL, i, label); if (Bwrite(fil, buf, len)!=len) break; } @@ -3661,8 +3661,8 @@ static int32_t OnSaveTileGroup(void) #define TTAB "\t" #define TBITCHK(i) ((i)>3]&(1<<((i)&7)))) Bfprintf(fp, OURNEWL); - Bfprintf(fp, "tilegroup \"%s\""OURNEWL"{"OURNEWL, name); - Bfprintf(fp, TTAB "hotkey \"%c\""OURNEWL OURNEWL, hotkey); + Bfprintf(fp, "tilegroup \"%s\"" OURNEWL"{" OURNEWL, name); + Bfprintf(fp, TTAB "hotkey \"%c\"" OURNEWL OURNEWL, hotkey); if (!(s_TileGroups[tile_groups].pIds = (int32_t *)Bmalloc(n * sizeof(s_TileGroups[tile_groups].pIds[0])))) TMPERRMSG_RETURN("Out of memory."); @@ -3674,9 +3674,9 @@ static int32_t OnSaveTileGroup(void) if (lasti>=0 && !TBITCHK(i)) { if (names[lasti][0] && names[i-1][0]) - Bfprintf(fp, TTAB "tilerange %s %s"OURNEWL, names[lasti], names[i-1]); + Bfprintf(fp, TTAB "tilerange %s %s" OURNEWL, names[lasti], names[i-1]); else - Bfprintf(fp, TTAB "tilerange %d %d"OURNEWL, lasti, i-1); + Bfprintf(fp, TTAB "tilerange %d %d" OURNEWL, lasti, i-1); for (k=lasti; k>3] &= ~(1<<(k&7)); } - Bfprintf(fp, TTAB "tilerange %d %d"OURNEWL, lasti, MAXTILES-1); + Bfprintf(fp, TTAB "tilerange %d %d" OURNEWL, lasti, MAXTILES-1); } Bfprintf(fp, OURNEWL); @@ -3717,7 +3717,7 @@ static int32_t OnSaveTileGroup(void) if (k) { // throw them all in a tiles{...} group else - Bfprintf(fp, TTAB "tiles\n" TTAB "{"OURNEWL); + Bfprintf(fp, TTAB "tiles\n" TTAB "{" OURNEWL); for (i=0; i0) Bfprintf(fp, OURNEWL); - Bfprintf(fp, TTAB "}"OURNEWL); + Bfprintf(fp, TTAB "}" OURNEWL); } #undef TBITCHK #undef TTAB - Bfprintf(fp, "}"OURNEWL); + Bfprintf(fp, "}" OURNEWL); Bfclose(fp); @@ -8898,7 +8898,7 @@ int32_t ExtPreInit(int32_t argc,const char **argv) " C++ build" #endif "\n", VERSION, s_buildRev); - initprintf("Compiled %s\n", __DATE__" "__TIME__); + initprintf("Compiled %s\n", __DATE__ " " __TIME__); // initprintf("Copyright (c) 2008 EDuke32 team\n"); G_CheckCommandLine(argc,argv); diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index e6ad99dd2..5c6ee762f 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -50,7 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define APPNAME "EDuke32" #define VERSION "2.0.0devel" -#define HEAD2 APPNAME" "VERSION +#define HEAD2 APPNAME " " VERSION #define VOLUMEALL (g_Shareware == 0) #define PLUTOPAK (g_scriptVersion == 14) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 2a299be4a..5426759f4 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -11227,7 +11227,7 @@ int32_t app_main(int32_t argc, const char **argv) " C++ build" #endif "\n", s_buildRev); - initprintf("Compiled %s\n", __DATE__" "__TIME__); + initprintf("Compiled %s\n", __DATE__ " " __TIME__); if (!usecwd) G_AddSearchPaths(); diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 1518092c4..f90bbee50 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -345,7 +345,7 @@ void Gv_DumpValues(void) else if (aGameVars[i].dwFlags & (GAMEVAR_PERACTOR)) OSD_Printf(" GAMEVAR_PERACTOR"); else - OSD_Printf(" %"PRIdPTR,aGameVars[i].dwFlags/* & (GAMEVAR_USER_MASK)*/); + OSD_Printf(" %" PRIdPTR,aGameVars[i].dwFlags/* & (GAMEVAR_USER_MASK)*/); OSD_Printf(" // "); if (aGameVars[i].dwFlags & (GAMEVAR_SYSTEM))