View Single Post
  #13   Spotlight this post!  
Unread 06-04-2006, 01:21
TimCraig TimCraig is offline
Registered User
AKA: Tim Craig
no team
 
Join Date: Aug 2004
Rookie Year: 2003
Location: San Jose, CA
Posts: 221
TimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to behold
Re: Critique this code

-w3 is the highest and gives "errors, warnings, and messages" -w1 is the lowest at errrors only. It looks like it defaults to -w2 because MPLAB doesn't show anything when I set that. That level is errors and warnings. I would use at least -w2 and then fix your code so there are no errors generated. If you don't, you and your successor will have to wade through a ton of warnings and may miss something important.

I'm not sure how stringent C18 is in generating warnings. If you get serious about it, you can run your code through a Lint program and generate a more comprehensive set of warnings. One place I used to work required we crank up the compiler and fix those warnings and then Lint it and fix those. Sometimes it was tough to make both happy but worth it.