Esin Andrey <[EMAIL PROTECTED]> ha escrit:

> 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

This warning reflects the fact that, depending on whether the default
char type is unsigned or signed either (0 <= *p) or (*p <= 127) would
always yield true. Which does not change the fact that the entire
comparison will work nevertheless, yielding true only if *p is not
within the 7-bit ascii range.

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

The change you propose will always yield false, no matter what the
default signedness of char, because it can never be greater than 127
and less than 0 at the same time.

Regards,
Sergey


Reply via email to