Fix a few warnings.
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 15 Jan 2020 08:52:21 +0000 (08:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 15 Jan 2020 08:52:21 +0000 (08:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12488 d7cf8633-e32d-0410-b094-e92efae38249

common.c
model_brush.c
prvm_edict.c

index c45814f..9b7dd10 100644 (file)
--- 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++);
        }
index 0c3fc28..cf2fed0 100644 (file)
@@ -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;
index e4d1e97..28e8081 100644 (file)
@@ -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);