]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
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 c45814fc5f5e1a3ac50fe2cff4b5e38549a67a66..9b7dd101926608013114dfe71e685c536b2a9445 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 0c3fc283d096247fd936022a2e6e09c8709be548..cf2fed0cf3df6e7a7bd454697871118ce5a2cb5b 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 e4d1e972ff0a42c56ef424b5016cfc7f4e0c6b08..28e8081727adcfee81c2ec8613b4a7fa64cb0a8d 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);