A few casts and variable type changes to get rid of warnings on Win64. By Willis
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 21 Jan 2006 09:59:11 +0000 (09:59 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 21 Jan 2006 09:59:11 +0000 (09:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5920 d7cf8633-e32d-0410-b094-e92efae38249

console.c
csprogs.c
image_png.c
keys.c
prvm_cmds.c

index 641bc96..4f498a9 100644 (file)
--- a/console.c
+++ b/console.c
@@ -886,7 +886,7 @@ qboolean GetMapList (const char *s, char *completedname, int completednamebuffer
        min = 666;
        for(max=i=0;i<t->numfilenames;i++)
        {
-               k = strlen(t->filenames[i]);
+               k = (int)strlen(t->filenames[i]);
                k -= 9;
                if(max < k)
                        max = k;
@@ -895,7 +895,7 @@ qboolean GetMapList (const char *s, char *completedname, int completednamebuffer
                        min = k;
                len[i] = k;
        }
-       o = strlen(s);
+       o = (int)strlen(s);
        for(i=0;i<t->numfilenames;i++)
        {
                int lumpofs = 0, lumplen = 0;
@@ -1104,7 +1104,7 @@ void Con_CompleteCommandLine (void)
                                char t[MAX_QPATH];
                                if (GetMapList(s, t, sizeof(t)))
                                {
-                                       i = strlen(t) - strlen(s);
+                                       i = (int)(strlen(t) - strlen(s));
                                        strcpy((char*)s, t);
                                        if(s2[0])       //add back chars after cursor
                                                strcpy(&key_lines[edit_line][key_linepos], s2);
index 1de0cf9..b0f811a 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -401,7 +401,7 @@ static void CL_VM_Parse_Print (const char *msg)
 
 void CSQC_AddPrintText (const char *msg)
 {
-       int i;
+       size_t i;
        if(!csqc_loaded || !CSQC_Parse_Print)
        {
                Con_Print(msg);
index 19304fb..2adb961 100644 (file)
@@ -211,8 +211,8 @@ void PNG_fReadData(void *png, unsigned char *data, size_t length)
                length = l;
        }
        memcpy(data, my_png.tmpBuf + my_png.tmpi, length);
-       my_png.tmpi += length;
-       Com_HexDumpToConsole(data, length);
+       my_png.tmpi += (int)length;
+       Com_HexDumpToConsole(data, (int)length);
 }
 
 void PNG_error_fn(void *png, const char *message)
diff --git a/keys.c b/keys.c
index 97070dd..b311d1e 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -465,7 +465,7 @@ Key_Console (int key, char ascii)
                if (keydown[K_CTRL])
                        con_backscroll = 0;
                else
-                       key_linepos = strlen(key_lines[edit_line]);
+                       key_linepos = (int)strlen(key_lines[edit_line]);
                return;
        }
 
index aadcabc..db63a14 100644 (file)
@@ -3562,7 +3562,8 @@ void VM_buf_implode (void)
        qcstrbuffer_t   *b;
        char                    *k;
        const char              *sep;
-       int                             i, l;
+       int                             i;
+       size_t                  l;
        VM_SAFEPARMCOUNT(2, VM_buf_implode);
 
        b = BUFSTR_BUFFER((int)PRVM_G_FLOAT(OFS_PARM0));