diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2007-10-13 05:49:18 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2007-10-13 05:49:18 +0000 |
commit | 6060d613d1791632b0d6eaafc7d83210f791799a (patch) | |
tree | 84b1a4a2572425e548becb1ba6043fce2b4f3c22 | |
parent | 3f12066739fdda1a387948717897876c1dcb25e7 (diff) | |
download | tar-6060d613d1791632b0d6eaafc7d83210f791799a.tar.gz |
* src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1
warning about "comparison is always true due to limited range of
data type" when char is unsigned.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/utf8.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2007-10-12 Paul Eggert <eggert@cs.ucla.edu> + + * src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1 + warning about "comparison is always true due to limited range of + data type" when char is unsigned. + 2007-10-11 Paul Eggert <eggert@cs.ucla.edu> Adjust to recent gnulib changes. @@ -91,7 +91,7 @@ bool string_ascii_p (char const *p) { for (; *p; p++) - if (! (0 <= *p && *p <= 127)) + if (*p & ~0x7f) return false; return true; } |