1,
Slave;
2,
Open the terminal;
3,
Extract: Tar zxvfsplint-3.1.2.src.tgz
4,
Install it in the/usr/local/splint directory:
Sudo mkdir/usr/local/splint
CD splint-3.1.2
./Configure -- prefix =/usr/local/splint
Sudo apt-getinstall flex
Make
Sudo make install
5,
Configuration to open the current bash resource file
VI ~ /. Bashrc
Add at the end of the file:
Exportlarch_path =/usr/local/splint/share/splint/lib
Exportlclimportdir =/usr/local/splint/share/splint/imports
Exportpath =/usr/local/splint/bin: $ path
Exit File
Source ~ /. Bashrc
Test: Test. c
Void fun ()
{
Int * P = NULL;
}
Enter splint test. C on the terminal
Splint 3.1.2 --- 25 Jan 2013
Test. C: (in function fun)
Test. C: 3: 7: Variable P declared but notused
Avariable is declared but never used. Use/* @ unused @ */In front
Declaration to suppress message. (use-varuse to inhibit warning)
Finished checking --- 1 code warning
References:
1,
Http://www.splint.org/
2,
Http://blog.csdn.net/sunjiajiang/article/details/7368684