Pclint usage (1)

Source: Internet
Author: User

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.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.