[PATCH] sys/types.h: Avoid bit-manipulation of signed values
Nick Withers
nick.withers@anu.edu.au
Thu Nov 12 04:14:00 GMT 2015
Hi all,
The patch below attempts to resolve potential undefined behaviour in
bit-manipulation in the FD_* macros, also clearing up the GCC warning
"conversion to 'unsigned int' from 'int' may change the sign of the
result" with -Wsign-conversion and an int FD parameter.
If folk're happy with this, should I make similar changes to
"newlib/libc/sys/linux/sys/types.h"? Not sure I want to touch
"winsup/cygwin/include/sys/param.h"... :-P
Ta!
--
Nick Withers
Embedded Systems Programmer
Department of Nuclear Physics, Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
More information about the Newlib
mailing list