I want to know how to do a static code analysis with my C code in
Perl, instead of splint.
anyone give and ideas or some perl scripts?
thanks in advance.
Since falling through to the next case is legal in C
and C syntax does not provide any kind of explicit
indication your task is hopeless.
Other than break, common last lines of a case include
goto, continue and return - all perfectly valid.
Putting a break after any of these would be likely to
generate an unreachable statement warning.
My advice is to port your application to perl which is
known for its clean, maintainable syntax.
Here is a free rexexp for checking for using '=' when you
meant '==' in an if statement. Enjoy.
/\Wif\W.*[^=><!]=[^=].*\)/