Choosing a static code analysis tool

Question :

Choosing a static code analysis tool,

Answer :

I’m working on a project where I’m coding in C in a UNIX environment. I’ve been using the lint tool to check my source code. Lint has been around a long time (since 1979), can anyone suggest a more recent code analysis tool I could use ? Preferably a tool that is free


Don’t overlook the compiler itself. Read the compiler’s documentation and find all the warnings and errors it can provide, and then enable as many as make sense for you.

Read More  I have a link icon next to each link. How do I exclude the link icon from images?

Also make sure to tell your compiler to treat warnings like errors so you’re forced to fix them right away (-Werror on gcc).
By the way, don’t be fooled -Wall on gcc does not enable all warnings.

You may want to check valgrind (free!) — it “automatically detect[s] many memory management and threading bugs, and profile[s] your programs in detail.” It isn’t a static checker, but it’s a great tool!

That’s the answer Choosing a static code analysis tool, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Read More  Replicating load related crashes in non-production environments

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you