Jim Meyering <[email protected]> wrote:
> After the used-uninitialized bug Dan Berrange found
> in the windows-only part of poll.c, we've been motivated
> to enable more warnings when building libvirt's subset
> of gnulib, even (or rather especially) when cross-compiling
> for mingw.
>
> To that end, there are a few more warnings in poll.c that I'm
> considering.  Two approaches:
>
> 1) Do what I did to inttostr.c a week or so ago
> and add this at the top of poll.c:
>
>   /* Tell gcc not to warn about the (nfd < 0) tests, below.  */
>   #if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
>   # pragma GCC diagnostic ignored "-Wtype-limits"
>   #endif
>
> 2) or use this patch:

I included the wrong patch there.
I meant to propose one that removed the "nfd < 0" tests altogether,
[affecting both windows-only and non-windows cases]
since nfds_t is required by POSIX to be an unsigned type.
Unless we know of systems on which that type is erroneously
a signed type, it would be safe to remove the tests.


Reply via email to