Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3CF107A3.4651AF3D@phekda.freeserve.co.uk> Date: Sun, 26 May 2002 17:04:51 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: refresh++ References: <200205261159 DOT g4QBxVO22330 AT speedy DOT ludd DOT luth DOT se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Martin Str|mberg wrote: [snip] > Yes. Why (extremely strong expletive) is gcc complaining about > perfectly legal and useful code. It's actually trying to help us out. The warning is about the "zero-length format string" we're passing to snprintf. It's only an error, because we're compiling with -Werror now. > The fact that libc happily changes their code to comply with broken > gcc behaviour does not say much. [snip] IMHO using snprintf like this to truncate a string is overkill. Why not just truncate it using "buf[0] = '\0';"? Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]