N
Nomen Nescio
Kaz Kylheku said:You forgot the obvious: compile with "gcc -Wall -W".
I guess you're talking to bartc. I don't use gcc.
test.c: In function ‘main’:
test.c:7:33: warning: comparison between signed and unsigned integer expressions
test.c:9:34: warning: comparison between signed and unsigned integer expressions
test.c:11:1: warning: control reaches end of non-void function
This is not better. Splint is not a tool that you can simply download, compile
and then run in this manner. Proper use of Splint requires you to RTFM and then
fine-tune the tool to actually look for problems. Making the most of Splint
requires special annotations in the code.
Fine but I thought most of the people here are such experts in C that they
would have no problems doing that. Since they like outsmarting gcc or
whatever C compiler they use, they surely have extra time for RTFM ;-)
If you just invoke it this way, you get reams of spewage full of all kinds of
false positive identifications of situations, most of which are are not
erroneous in any way.
No doubt. My point was simply there are tools that can find stupid mistakes
and they should probably be used. C is not my thing, but if it's yours I'm
sure you know all the tricks already.