Remove some warnings with clang, code-side changes.

git-svn-id: https://svn.eduke32.com/eduke32@2158 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-09 19:08:29 +00:00
parent a7bce8814a
commit 6fc7e5b683
4 changed files with 11 additions and 9 deletions

View file

@ -32,11 +32,13 @@
#endif #endif
#if (!defined __APPLE__ && !defined HAVE_GTK2) || (defined __APPLE__) // && defined __BIG_ENDIAN__) #if (!defined __APPLE__ && !defined HAVE_GTK2) || (defined __APPLE__) // && defined __BIG_ENDIAN__)
#undef UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(x) x=x
int32_t startwin_open(void) { return 0; } int32_t startwin_open(void) { return 0; }
int32_t startwin_close(void) { return 0; } int32_t startwin_close(void) { return 0; }
int32_t startwin_puts(const char *s) { s=s; return 0; } int32_t startwin_puts(const char *s) { UNREFERENCED_PARAMETER(s); return 0; }
int32_t startwin_idle(void *s) { s=s; return 0; } int32_t startwin_idle(void *s) { UNREFERENCED_PARAMETER(s); return 0; }
int32_t startwin_settitle(const char *s) { s=s; return 0; } int32_t startwin_settitle(const char *s) { UNREFERENCED_PARAMETER(s); return 0; }
#endif #endif
/// These can be useful for debugging sometimes... /// These can be useful for debugging sometimes...

View file

@ -208,7 +208,7 @@ const char *animvpx_nextpic_errmsg[] = {
// retrieves one picture-frame from the stream // retrieves one picture-frame from the stream
// pic format: lines of [Y U V 0] pixels // pic format: lines of [Y U V 0] pixels
// *picptr==NULL means EOF has been reached // *picptr==NULL means EOF has been reached
#ifndef USING_LTO #if !defined __clang__ && !defined USING_LTO
# ifdef DEBUGGINGAIDS # ifdef DEBUGGINGAIDS
ATTRIBUTE((optimize("O1"))) ATTRIBUTE((optimize("O1")))
# else # else

View file

@ -1260,9 +1260,9 @@ static void taglab_handle1(int32_t linktagp, int32_t tagnum, char *buf)
label = taglab_getlabel(tagnum); label = taglab_getlabel(tagnum);
if (label) if (label)
Bsprintf(buf, "%hu<%s>", tagnum, label); Bsprintf(buf, "%d<%s>", tagnum, label);
else else
Bsprintf(buf, "%hu%s", tagnum, TLCHR(linktagp)); Bsprintf(buf, "%d%s", tagnum, TLCHR(linktagp));
} }
////////// end tag labeling system ////////// ////////// end tag labeling system //////////

View file

@ -1029,7 +1029,7 @@ static uint8_t *writespecdata(const dataspec_t *spec, FILE *fil, uint8_t *dump)
if (fil) if (fil)
{ {
if (((sp->flags&DS_CNTMASK)==0 && sp->size *cnt<=(int32_t)savegame_comprthres) if (((sp->flags&DS_CNTMASK)==0 && sp->size*cnt<=savegame_comprthres)
|| (sp->flags&DS_CMP)) || (sp->flags&DS_CMP))
fwrite(ptr, sp->size, cnt, fil); fwrite(ptr, sp->size, cnt, fil);
else else
@ -1097,7 +1097,7 @@ static int32_t readspecdata(const dataspec_t *spec, int32_t fil, uint8_t **dumpv
{ {
mem = (dump && (sp->flags&DS_NOCHK)==0) ? dump : ptr; mem = (dump && (sp->flags&DS_NOCHK)==0) ? dump : ptr;
if ((sp->flags&DS_CNTMASK)==0 && sp->size *cnt<=(int32_t)savegame_comprthres) if ((sp->flags&DS_CNTMASK)==0 && sp->size*cnt<=savegame_comprthres)
{ {
i = kread(fil, mem, cnt*sp->size); i = kread(fil, mem, cnt*sp->size);
j = cnt*sp->size; j = cnt*sp->size;
@ -1111,7 +1111,7 @@ static int32_t readspecdata(const dataspec_t *spec, int32_t fil, uint8_t **dumpv
{ {
OSD_Printf("rsd: spec=%p, sp=%p, mem=%p ", spec, sp, mem); OSD_Printf("rsd: spec=%p, sp=%p, mem=%p ", spec, sp, mem);
OSD_Printf("rsd: %s: read %d, expected %d!\n", OSD_Printf("rsd: %s: read %d, expected %d!\n",
((sp->flags&DS_CNTMASK)==0 && sp->size *cnt<=(int32_t)savegame_comprthres)? ((sp->flags&DS_CNTMASK)==0 && sp->size*cnt<=savegame_comprthres)?
"UNCOMP":"COMPR", i, j); "UNCOMP":"COMPR", i, j);
if (i==-1) if (i==-1)