[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] minor warning glitch in tar 1.19 on Solaris 8 (sparc) with GCC
From: |
Paul Eggert |
Subject: |
[Bug-tar] minor warning glitch in tar 1.19 on Solaris 8 (sparc) with GCC 4.2.1 |
Date: |
Fri, 12 Oct 2007 22:50:16 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Building GNU tar with GCC 4.2.1 on a machine where char is unsigned
elicits this bogus warning:
utf8.c: In function 'string_ascii_p':
utf8.c:94: warning: comparison is always true due to limited range of data type
mv -f .deps/utf8.Tpo .deps/utf8.Po
I observed the problem on Solaris 8 (sparc) but I imagine it happens
elsewhere. I installed this patch:
2007-10-12 Paul Eggert <address@hidden>
* 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.
--- src/utf8.c 27 Jun 2007 13:30:15 -0000 1.10
+++ src/utf8.c 13 Oct 2007 05:49:15 -0000
@@ -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;
}
- [Bug-tar] minor warning glitch in tar 1.19 on Solaris 8 (sparc) with GCC 4.2.1,
Paul Eggert <=