Any Tools to Catch Silly Mistakes in C Code?
I had a nasty typo that wasted my time and my colleague's time, it was something like this: for (i = 0; i < blah; i++); // <- I had a semi-colon here, that's the bug! { // Some awesome logic here } First of all, it's very embarrassing, second thing, I should never repeat this. I'm relatively new to C. In Java, I guess I can use FindBugs to catch errors like these, what tool should I use for C code? Lint? Yes, PC-Lint is probably the best tool available. Michael Burr In addition to Lykathea's PC-Lint suggestion , you can also get better (or at least more) diagnostics if you bump up the warning