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 641bc965c2e7cd0fe08baf3f9ee055eaf7bb898f..4f498a95e7b0cb53d791c13048846278a4fcb7f2 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 1de0cf974c76047f59f28b0d29a706cfe8a5672e..b0f811ab638b1aaad25b3bb0ac5cb2e058bd1bc8 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 19304fbcf91256cbd0a60cbfc1bc197c4a612b14..2adb961727a8e7db4ad6cd9dc58c6774e8e1b9b6 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 97070dd684fac8a5b9eef7c112d398910f8241b6..b311d1ed56a35e0c7264a378ba4f1f4a1e6e3a65 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 aadcabc8c18a9846faf0eb9c657d0dfe1d92ad74..db63a14152180c928cb5984559710f52d5ba23f7 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));