From: Michael Wookey Date: Mon, 31 Aug 2009 23:31:05 GMT Subject: Re: [PATCH] fast-import.c: Silence build warning Message-ID: In-Reply-To: <81b0412b0908311427t5b4a24ffg1d7d272669476117@mail.gmail.com> 2009/9/1 Alex Riesen : > On Mon, Aug 31, 2009 at 14:29, Sverre Rabbelier wrote: >> On Mon, Aug 31, 2009 at 04:21, Michael Wookey wrote: >>> Provide a dummy variable to keep the compiler happy. >> >> Should we not instead check the value? > > Why? It is endp (end of the parsed number) we're interested in. Good point, perhaps the commit message should mention why we don't bother checking the return value. Something like this maybe? -- >8 -- gcc 4.3.3 (Ubuntu 9.04) warns that the return value of strtoul() was not checked by issuing the following notice: warning: ignoring return value of ‘strtoul’, declared with attribute warn_unused_result The return value of strtoul() isn't used because we are only interested in what is placed into endp. As such, provide a dummy variable to keep the compiler happy. Signed-off-by: Michael Wookey -- >8 --