From 0b5bc85c917b815db70fd073c4338307fc43cee0 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 9 Dec 2017 22:10:51 +0000 Subject: [PATCH] fix some warnings and stuff git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5181 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 8 ++++---- engine/client/wad.c | 2 +- engine/client/zqtp.c | 2 +- engine/gl/gl_font.c | 2 +- engine/gl/gl_model.c | 8 ++++---- engine/qclib/pr_exec.c | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 503b192ec..fe87ba925 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -1409,10 +1409,10 @@ void CL_Rcon_f (void) } } - message[0] = 255; - message[1] = 255; - message[2] = 255; - message[3] = 255; + message[0] = (char)255; + message[1] = (char)255; + message[2] = (char)255; + message[3] = (char)255; message[4] = 0; Q_strncatz (message, "rcon ", sizeof(message)); diff --git a/engine/client/wad.c b/engine/client/wad.c index 6a511ee45..6bf7eca04 100644 --- a/engine/client/wad.c +++ b/engine/client/wad.c @@ -26,7 +26,7 @@ void *wadmutex; #ifndef PACKAGE_TEXWAD void Wads_Flush (void){} qboolean Wad_NextDownload (void){return true;} -void *W_SafeGetLumpName (const char *name, size_t *size) {return NULL;} +void *W_GetLumpName (const char *name, size_t *size, qbyte *type) {return NULL;} qbyte *W_GetTexture(const char *name, int *width, int *height, qboolean *usesalpha){return NULL;} void W_LoadWadFile (char *filename){} void W_Shutdown (void){} diff --git a/engine/client/zqtp.c b/engine/client/zqtp.c index 44e03b9ef..212d95f3d 100644 --- a/engine/client/zqtp.c +++ b/engine/client/zqtp.c @@ -3789,7 +3789,7 @@ void CL_Say (qboolean team, char *extra) if (*s == 'z') *d++ = 'x'; else - *d++ = 139; + *d++ = (char)139; *d++ = '^'; *d++ = 'r'; diff --git a/engine/gl/gl_font.c b/engine/gl/gl_font.c index 9237b8ff6..c690fdc96 100644 --- a/engine/gl/gl_font.c +++ b/engine/gl/gl_font.c @@ -1722,7 +1722,7 @@ struct font_s *Font_LoadFont(float vheight, const char *fontfilename) FMT_QUAKE, //first is default FMT_ISO88591, //latin-1 (first 256 chars of unicode too) FMT_HORIZONTAL, //unicode, charcount=width/(height-2). single strip of chars, like halflife. - } fmt; + } fmt = FMT_AUTO; Q_strncpy(facename, fontfilename, sizeof(facename)); diff --git a/engine/gl/gl_model.c b/engine/gl/gl_model.c index 11db50fe8..33068c0a5 100644 --- a/engine/gl/gl_model.c +++ b/engine/gl/gl_model.c @@ -230,10 +230,10 @@ static void Mod_BlockTextureColour_f (void) // unsigned int colour[8*8]; unsigned int rgba; - ((char *)&rgba)[0] = atoi(Cmd_Argv(2)); - ((char *)&rgba)[1] = atoi(Cmd_Argv(3)); - ((char *)&rgba)[2] = atoi(Cmd_Argv(4)); - ((char *)&rgba)[3] = 255; + ((qbyte *)&rgba)[0] = atoi(Cmd_Argv(2)); + ((qbyte *)&rgba)[1] = atoi(Cmd_Argv(3)); + ((qbyte *)&rgba)[2] = atoi(Cmd_Argv(4)); + ((qbyte *)&rgba)[3] = 255; sprintf(texname, "purergb_%i_%i_%i", (int)((char *)&rgba)[0], (int)((char *)&rgba)[1], (int)((char *)&rgba)[2]); /* s = R_RegisterCustom(Cmd_Argv(2), SUF_LIGHTMAP, NULL, NULL); diff --git a/engine/qclib/pr_exec.c b/engine/qclib/pr_exec.c index cf7eb168b..045da4a9c 100644 --- a/engine/qclib/pr_exec.c +++ b/engine/qclib/pr_exec.c @@ -1357,7 +1357,7 @@ static const char *lastfile = 0; if (debugaction == DEBUG_TRACE_NORESUME) continue; else if(debugaction == DEBUG_TRACE_ABORT) - progfuncs->funcs.parms->Abort (fault?fault:"Debugger Abort"); + progfuncs->funcs.parms->Abort ("%s", fault?fault:"Debugger Abort"); else if (debugaction == DEBUG_TRACE_OFF) { //if we're resuming, don't hit any lingering step-over triggers