This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
PROPOSED FIX to remove warning in 1.1.5-3 sys/types.h
- To: <cygwin at sourceware dot cygnus dot com>
- Subject: PROPOSED FIX to remove warning in 1.1.5-3 sys/types.h
- From: "Christian Jullien" <eligis at wanadoo dot fr>
- Date: Fri, 3 Nov 2000 20:32:48 +0100
Hi,
The following macro in sys/types.h
# define FD_ZERO(p) (__extension__ (void)({ \
int i; \
char *__tmp = (char *)p; \
for (i = 0; i < sizeof (*(p)); ++i) \
*__tmp++ = 0; \
}))
raise a new warning 'signed unsigned comparison'
I suggest to replace
int i;
with unsigned int i;
A better solution should be to include stddef (for size_t) and have:
size_t i;
which is the type returned by sizeof.
But, unless I'm totaly wrong, the fastest solution is to use memset that
will be expanded inline with assembly code. Right?
regards.
Christian Jullien
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com