1. Introduction to pclint:
PC-Lint is a static analysis tool for C/C ++ software code developed by gimpel software. Its full name is PC-Lint/flexelint for C/C ++, PC-Lint can be used on Windows, MS-DOS and OS/2 platforms and released in the form of binary executable files, while flexelint runs on other platforms and is released in the form of source code. PC-Lint has a wide range of customers around the world. Many large software development organizations use PC-Lint check as the first process of code lookup. PC-Lint can not only perform global analysis on the program, identify the array subscript that has not been properly tested, report uninitialized variables, and warn you to use null pointers and redundant code, it also helps you to improve the space utilization and running efficiency of many programs.
Ii. installation and configuration
1. Now, you can download the free PC-Lint 8.0 on the Internet. You can simply decompress the package.
2. You can use config.exe to generate the configuration file. If you are skilled, You can manually write the STD. LNT file. Refer to "pc_lintexperience" for the configuration process of config.ext.
3. To integrate PC-lint with source insight, see section 4.3.2 In pc_lint experience.
Iii. Problems Encountered during configuration
Because the target code is applied on the Linux platform, we need to inform pclint of the Linux system header file. The method I used is to map/usr/include to Windows (Samba can be used ), then modify the STD used by pclint. add the include path to the LNT file, for example, "-Iz:/include ". If there are other problems, you can view the instructions in the PC-lint-pclint directory according to the error code.
Iv. Summary
1. The current pclint can work. Check a separate. c file and you cannot directly parse the project.
2. In the result of pclint check, the warning information of library functions accounts for a large proportion.
References:
Pc_lint experience: http://download.csdn.net/source/2162695
The PC-Lint software package is included.