[Icc-avr] Using SPLINT with ICC

Clark, Andy icc-avr@imagecraft.com
Wed, 26 Mar 2003 10:48:54 -0000


Hi,

The "ICCAVR and LINT Checking" thread prompted me to try the GPL Splint (as
mentioned - www.splint.org), here's a quick step by step...

1)Downloaded the minimum win32 install (http://www.splint.org/win32.html )
2)Unpacked it to the recommended "C:\splint-3.0.1.6" path
3)Set a new environmental var called "include" to point to the ICC include
dir.
4)Set "path" to include "C:\splint-3.0.1.6\bin"
5)Added a new ICC tool with the following settings...
   Menu name  = Splint
   Program    = splint.exe  -f C:\splint-3.0.1.6\splintrc
   Parameters = %f
   Capture    = checked
6)Created a new text file called "splintrc" in "C:\splint-3.0.1.6\"
7)Added the following lines to the file (these are switches that stop
warnings which I'm not too bothered about - I'll probably regret some of
these later!)...

+charint
-predboolint
-boolops
-unrecog
-maintype
+matchanyintegral
-exportlocal

8)Selected "Splint" from the "Tools" menu.
9)Smiled contentedly at only 23 warnings!!!

If you remove the "-f C:\splint-3.0.1.6\splintrc" option from the tool
setting you will get a lot more warnings generated but this is worth doing
as it will explain the use of the switches in "splintrc".

All in all I was quite impressed by the ease of use and yes, it does catch
the "==" problem.

HTH 

AndyC
www.andybits.co.uk (badly in need of an update!)