From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson To: Jakub Jelinek Cc: drepper@cygnus.com, libc-hacker@sourceware.cygnus.com Subject: Re: [PATCH] shut up warnings in bits/string2.h Date: Tue, 07 Dec 1999 18:41:00 -0000 Message-id: <19991207184120.D13790@twiddle.net> References: <19991207220811.M515@mff.cuni.cz> X-SW-Source: 1999-12/msg00016.html 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~