<br><div class="gmail_quote">On Sat, Feb 6, 2010 at 2:25 PM, Edwin Groothuis <span dir="ltr"><<a href="mailto:edwin@mavetju.org">edwin@mavetju.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">Jonathan Leffler <jonathan.leffler <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
<br>
> You could avoid the cast by using:    return strcpy(buf, "??? ??? ?? ??:??:??<br>
????\n");This is one of the few occasions when the return value from strcpy()<br>
actually is useful.<br>
<br>
</div>I have a hard time finding a gcc option to enable these "returned value not<br>
used" warnings which would need this cast... :-)<br></blockquote></div><br>There are other tools than GCC for measuring the 'quality' of code - and some of them get antsy (or, more accurately, used to get antsy) about not using the values returned by a function, the obvious example being 'lint'.  On the whole, GCC does a good job of not whingeing when it isn't necessary; not all analysis programs have such good heuristics.<br clear="all">

<br>I seldom use 'lint' these days (as in, I'm not sure when I did last use it). I had to check whether it was available on MacOS X and to my not very big surprise, it is not, but it tends to be available on the classic versions of Unix derived from AT&T System V.<br>

<br>-- <br>Jonathan Leffler <<a href="mailto:jonathan.leffler@gmail.com">jonathan.leffler@gmail.com</a>>  #include <disclaimer.h><br>Guardian of DBD::Informix - v2008.0513 - <a href="http://dbi.perl.org">http://dbi.perl.org</a><br>

"Blessed are we who can laugh at ourselves, for we shall never cease to be amused."<br>