<br><div class="gmail_quote">On Sat, Feb 6, 2010 at 2:25 PM, Edwin Groothuis <span dir="ltr">&lt;<a href="mailto:edwin@mavetju.org">edwin@mavetju.org</a>&gt;</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 &lt;jonathan.leffler &lt;at&gt; <a href="http://gmail.com" target="_blank">gmail.com</a>&gt; writes:<br>
<br>
&gt; You could avoid the cast by using:    return strcpy(buf, &quot;??? ??? ?? ??:??:??<br>
????\n&quot;);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 &quot;returned value not<br>
used&quot; warnings which would need this cast... :-)<br></blockquote></div><br>There are other tools than GCC for measuring the &#39;quality&#39; 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 &#39;lint&#39;.  On the whole, GCC does a good job of not whingeing when it isn&#39;t necessary; not all analysis programs have such good heuristics.<br clear="all">

<br>I seldom use &#39;lint&#39; these days (as in, I&#39;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&amp;T System V.<br>

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

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