Gabriel Sechan wrote:
>
> ----------------------------------------
>> Date: Mon, 31 Mar 2008 13:51:22 -0700
>> From: [EMAIL PROTECTED]
>>
>> If 99% of the time the result is correct, does that make the code right
>> 99% of the time?
>>
>>
>
> Rephrasing: 99% of the time, the code in that situation *is* correct. It's
> only rarely an error. The correct answer is to flag it for human checking,
> but to allow it, which is what a warning does.
Heh, I was just tweaking you. ;-)
Eliminating the warnings is sometimes pretty tedious!
I'm in the camp that says it's worth it, even to the point of -Wall.
I certainly tend to wrinkle my nose when there are lots of warnings.
Would this be correct?
"""
#include <limits.h>
...
if (libretval_x & INT_MAX < mysigned_x)
do something..
"""
Regards,
..jim
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg