bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] tar-1.18


From: Esin Andrey
Subject: [Bug-tar] tar-1.18
Date: Sat, 25 Aug 2007 14:05:45 +0400
User-agent: Thunderbird 2.0.0.5 (X11/20070724)

Hi!
I try to compile tar-1.18 and have one warning:

utf8.c: In function ‘string_ascii_p’
utf8.c:94: warning: comparison is always true due to limited range of
data type

I try to write patch to correct this warning (it is in attach)

GCC version:
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
diff -urN tar-1.18.orig/src/utf8.c tar-1.18/src/utf8.c
--- tar-1.18.orig/src/utf8.c    2007-06-27 17:30:32.000000000 +0400
+++ tar-1.18/src/utf8.c 2007-08-25 13:41:16.000000000 +0400
@@ -91,7 +91,7 @@
 string_ascii_p (char const *p)
 {
   for (; *p; p++)
-    if (! (0 <= *p && *p <= 127))
+    if ( 127 <= *p && *p <= 0)
       return false;
   return true;
 }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]