bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] tar-1.18


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] tar-1.18
Date: Sat, 25 Aug 2007 17:17:17 +0300

Esin Andrey <address@hidden> 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

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