Sender: salvador AT delorie DOT com Message-ID: <3D0110A3.233FDFA9@inti.gov.ar> Date: Fri, 07 Jun 2002 16:59:32 -0300 From: salvador Organization: INTI X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.20 i686) X-Accept-Language: es-AR, en, es MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Useless warning from gcc 3.1 References: <200205272056 DOT g4RKuTs16122 AT speedy DOT ludd DOT luth DOT se> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g57Jxv420326 Reply-To: djgpp-workers AT delorie DOT com Martin Str|mberg wrote: > What unusual about ``sprintf(s, "")´´? It a perfectly legal way to > initialize s to an empty string. Come on! *s=0; is much more efficient, nobody will do what you say. If this, useless, statement is generated by some code generator you can correct it to generate better optimized code. I agree this is a silly warning, but you asked for -Wall ;-) The manpage says: -Wall All of the above `-W' options combined. These are all the options which pertain to usage that we rec­ ommend avoiding and that we believe is easy to avoid, even in conjunction with macros. And this warning looks quite easy to avoid. SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: set AT computer DOT org set AT ieee DOT org Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013