This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Suppress sign-conversion warning from FD_SET
+extern unsigned long int __fdelt_chk (long int __d);
+extern unsigned long int __fdelt_warn (long int __d)
Shouldn't these functions return the same type
that they accept?
- ({ unsigned long int __d = (d); \
+ ({ long int __d = (d); \
(__builtin_constant_p (__d) \
? (__d >= __FD_SETSIZE \
This should check for __d < 0 as well.
Or, to make it clearer, you might write it this way:
(0 <= d && d < __FD_SETSIZE
? __d / __NFDBITS
: __fdelt_warn (__d))