Lint your code: Find probable mistakes much before testing
Monday, March 23rd, 2009Subscribe To Our Feed | Follow Us On Twitter | Get Updates on Email
Every programmer, no matter how great he is, makes mistakes sometime or the other while coding. Although every compiler tries its best to put across every possible error during compilation,many mistakes skip the wrath of compiler. Some are seemingly very innocent and very tough to be caught even during code review, sometimes even get through the cycle of testing. The real face of these mistakes show up always on the customer side by crashing the system.
Consider the following example:
int multiply(int m, int n) { int result = 0; result = m * n; return result; } void func() { int m = 32767; int n = 32767; int result = 0; result = multiply( m, n ); }
© Safer Code | Lint your code: Find probable mistakes much before testing
|
Liked this post? Get FREE Updates Subscribe to RSS feed |