From 3324ec88a97bf6fd64c75df38e6dd23107d12b83 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 9 Jul 2017 18:21:54 -0400 Subject: [PATCH] Maybe fix compiler warnings on Cygwin. --- src/archiver_vdf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/archiver_vdf.c b/src/archiver_vdf.c index 1caa2d2..af9fce9 100644 --- a/src/archiver_vdf.c +++ b/src/archiver_vdf.c @@ -129,7 +129,7 @@ static PHYSFS_uint16 vdfGenCrc16(const char *c_ptr) PHYSFS_uint16 crc = 0xFFFF; while (*c_ptr) - crc = (crc << 8) ^ vdfCrcTable[((crc >> 8) ^ toupper(*c_ptr++))]; + crc = (crc << 8) ^ vdfCrcTable[((crc >> 8) ^ toupper((int)(*c_ptr++)))]; return crc; } /* vdfGenCrc16 */ @@ -262,7 +262,7 @@ static void vdfTruncateFilename(char *s, PHYSFS_uint32 *nameLength) s[VDF_ENTRY_NAME_LENGTH - 1] = '\0'; for (i = VDF_ENTRY_NAME_LENGTH - 2; i > 0; i--) { - if (isspace(s[i])) + if (isspace((int) s[i])) { s[i] = '\0'; } /* if */ @@ -288,7 +288,7 @@ static int vdfStrcmp(const char *a, const char *b) { while (*a && *b) { - if (toupper(*a) != toupper(*b)) return 1; + if (toupper((int) *a) != toupper((int) *b)) return 1; a++; b++; } /* while */