From f57af416ea28b2f9a7aa3cae6a3cd3843093a1b8 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 15 Jan 2020 08:52:21 +0000 Subject: [PATCH] Fix a few warnings. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12488 d7cf8633-e32d-0410-b094-e92efae38249 --- common.c | 4 ++-- model_brush.c | 2 +- prvm_edict.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common.c b/common.c index c45814fc..9b7dd101 100644 --- a/common.c +++ b/common.c @@ -2039,7 +2039,7 @@ char *InfoString_GetValue(const char *buffer, const char *key, char *value, size (buffer[pos+1 + keylength] == 0 || buffer[pos+1 + keylength] == '\\')) { - pos += 1 + keylength; // Skip \key + pos += 1 + (int)keylength; // Skip \key if (buffer[pos] == '\\') pos++; // Skip \ before value. for (j = 0;buffer[pos+j] && buffer[pos+j] != '\\' && j < (int)valuelength - 1;j++) value[j] = buffer[pos+j]; @@ -2094,7 +2094,7 @@ void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, con pos2 = pos; if (buffer[pos] == '\\') { - pos2 += 1 + keylength; // Skip \key + pos2 += 1 + (int)keylength; // Skip \key if (buffer[pos2] == '\\') pos2++; // Skip \ before value. for (;buffer[pos2] && buffer[pos2] != '\\';pos2++); } diff --git a/model_brush.c b/model_brush.c index 0c3fc283..cf2fed0c 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1700,7 +1700,7 @@ static void Mod_Q1BSP_LoadTextures(sizebuf_t *sb) } // bump it back to where we started parsing - sb->readcount = watermark; + sb->readcount = (int)watermark; firstskynoshadowtexture = loadmodel->num_textures; loadmodel->num_textures += numsky; diff --git a/prvm_edict.c b/prvm_edict.c index e4d1e972..28e80817 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -439,7 +439,7 @@ static char *PRVM_ValueString (prvm_prog_t *prog, etype_t type, prvm_eval_t *val dpsnprintf (line, linelength, "entity %i", n); break; case ev_function: - if ((unsigned int)val->function < prog->progs_numfunctions) + if ((unsigned int)val->function < (unsigned int)prog->progs_numfunctions) { f = prog->functions + val->function; dpsnprintf (line, linelength, "%s()", PRVM_GetString(prog, f->s_name)); @@ -533,7 +533,7 @@ char *PRVM_UglyValueString (prvm_prog_t *prog, etype_t type, prvm_eval_t *val, c dpsnprintf (line, linelength, "%i", i); break; case ev_function: - if ((unsigned int)val->function < prog->progs_numfunctions) + if ((unsigned int)val->function < (unsigned int)prog->progs_numfunctions) { f = prog->functions + val->function; strlcpy (line, PRVM_GetString (prog, f->s_name), linelength); -- 2.39.2