Procházet zdrojové kódy

Maybe fix compiler warnings on Cygwin.

Ryan C. Gordon před 8 roky
rodič
revize
3324ec88a9
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      src/archiver_vdf.c

+ 3 - 3
src/archiver_vdf.c

@@ -129,7 +129,7 @@ static PHYSFS_uint16 vdfGenCrc16(const char *c_ptr)
     PHYSFS_uint16 crc = 0xFFFF;
     PHYSFS_uint16 crc = 0xFFFF;
 
 
     while (*c_ptr)
     while (*c_ptr)
-        crc = (crc << 8) ^ vdfCrcTable[((crc >> 8) ^ toupper(*c_ptr++))];
+        crc = (crc << 8) ^ vdfCrcTable[((crc >> 8) ^ toupper((int)(*c_ptr++)))];
 
 
     return crc;
     return crc;
 } /* vdfGenCrc16 */
 } /* vdfGenCrc16 */
@@ -262,7 +262,7 @@ static void vdfTruncateFilename(char *s, PHYSFS_uint32 *nameLength)
 
 
     s[VDF_ENTRY_NAME_LENGTH - 1] = '\0';
     s[VDF_ENTRY_NAME_LENGTH - 1] = '\0';
     for (i = VDF_ENTRY_NAME_LENGTH - 2; i > 0; i--) {
     for (i = VDF_ENTRY_NAME_LENGTH - 2; i > 0; i--) {
-        if (isspace(s[i]))
+        if (isspace((int) s[i]))
         {
         {
             s[i] = '\0';
             s[i] = '\0';
         } /* if */
         } /* if */
@@ -288,7 +288,7 @@ static int vdfStrcmp(const char *a, const char *b)
 {
 {
     while (*a && *b)
     while (*a && *b)
     {
     {
-        if (toupper(*a) != toupper(*b)) return 1;
+        if (toupper((int) *a) != toupper((int) *b)) return 1;
         a++;
         a++;
         b++;
         b++;
     } /* while */
     } /* while */