Cygwin's ctype.h says;
/* These macros are intentionally written in a manner that will trigger
   a gcc -Wall warning if the user mistakenly passes a 'char' instead
   of an int containing an 'unsigned char'.
   (snip) */
---
 tools/c-index-test/c-index-test.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

...Takumi
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index d4e567d..d424e24 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -990,7 +990,7 @@ void print_completion_result(CXCompletionResult *completion_result,
 
 int my_stricmp(const char *s1, const char *s2) {
   while (*s1 && *s2) {
-    int c1 = tolower(*s1), c2 = tolower(*s2);
+    int c1 = tolower((unsigned char)*s1), c2 = tolower((unsigned char)*s2);
     if (c1 < c2)
       return -1;
     else if (c1 > c2)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to