Re: [PATCH] fast-import.c: Silence build warning
From: Michael Wookey <hidden>
Date: 2016-06-15 22:47:20
2009/9/1 Alex Riesen [off-list ref]:
On Mon, Aug 31, 2009 at 14:29, Sverre Rabbelier[off-list ref] wrote:quoted
On Mon, Aug 31, 2009 at 04:21, Michael Wookey[off-list ref] wrote:quoted
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 <redacted> -- >8 --