浏览代码

Fix compiler warning "array subscript has type char" when using arm-none-eabi-gcc

Ian Mobley 8 年之前
父节点
当前提交
d4836effc9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cJSON.c

+ 1 - 1
cJSON.c

@@ -50,7 +50,7 @@ static int cJSON_strcasecmp(const char *s1, const char *s2)
     {
         return 1;
     }
-    for(; tolower(*s1) == tolower(*s2); ++s1, ++s2)
+    for(; tolower(*(const unsigned char *)s1) == tolower(*(const unsigned char *)s2); ++s1, ++s2)
     {
         if (*s1 == 0)
         {