bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] test-nl_langinfo: avoid "unsigned expression >= 0 is always


From: Jim Meyering
Subject: Re: [PATCH] test-nl_langinfo: avoid "unsigned expression >= 0 is always true" warning
Date: Sun, 17 Oct 2010 22:39:35 +0200

Bruno Haible wrote:
> Hi Jim,
>
>>   test-nl_langinfo.c:56: warning: comparison of unsigned expression >= 0 \
>>     is always true [-Wtype-limits]
>
>> Is this change ok with you?
>> Alternatively, I'd be slightly happier simply
>> to remove the warning-evoking tests.
>
> Commenting out or removing these tests is not OK. These lines test whether
> nl_langinfo is returning a reasonable string, that is, not NULL and not a
> random pointer.
>
> I prefer to silence the warning explicitly in this case:
>
> 2010-10-17  Bruno Haible  <address@hidden>
>
>       nl_langinfo tests: Silence some warnings.
>       * tests/test-nl_langinfo.c: Silence -Wtype-limits warnings.
>       Reported by Jim Meyering.

Thanks!
With that, I can enable -Werror in coreutils' gnulib-tests directory.



reply via email to

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