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