From: Paul Eggert Date: Sat, 13 Oct 2007 05:49:18 +0000 (+0000) Subject: * src/utf8.c (string_ascii_p): Recode to avoid bogus GCC 4.2.1 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=6060d613d1791632b0d6eaafc7d83210f791799a;p=chaz%2Ftar * 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. --- diff --git a/ChangeLog b/ChangeLog index 3408856..6d15c9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-12 Paul Eggert + + * 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 Adjust to recent gnulib changes. diff --git a/src/utf8.c b/src/utf8.c index d5e5963..c9836d6 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -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; }