[PATCH] shut up warnings in bits/string2.h

Richard Henderson rth@twiddle.net
Tue Dec 7 18:41:00 GMT 1999


On Tue, Dec 07, 1999 at 10:08:11PM +0100, Jakub Jelinek wrote:
> 	* string/bits/string2.h (__memset_gc, __mempcpy_small, __strcpy_small,
> 	__stpcpy_small): Cast switch expressions to int to shut up compiler
> 	warnings.

The patch is wrong Jakub.  Suppose you have a string of
length 0x1_0000_0001.  You will truncate this to 1 and
do the wrong thing.

I know you are trying to silence the extra warnings from
gcc's -Wtraditional, but there's nothing to be done about
it except possibly nuking it from the compiler.


r~


More information about the Libc-hacker mailing list