Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C

PC-lint 101: What does Location cited in prior message mean?

4.33/5 (2 votes)
3 Aug 2012CPOL1 min read 58.4K  
If you are new to PC-lint, you may have wondered what message 830 (Location cited in prior message) means, and - given that such messages can add greatly to the overall issue count in your file or project - what (if any) use are they?Quite simply, message 830 identifies a location in the codebase

[Note: this article was automatically created from a blog feed. The original post can be found at http://www.riverblade.co.uk/blog.php?archive=2009_01_01_archive.xml#4365550481929190480].

If you are new to PC-lint, you may have wondered what message 830 ("Location cited in prior message") means, and - given that such messages can add greatly to the overall issue count in your file or project - what (if any) use are they?

Quite simply, message 830 identifies a location in the codebase which relates to the preceding message (or issue, in Visual Lint terminology).

For example, if you analyse the code shown below (lines with lint issues are highlighted in yellow):


the analysis results you will see are likely to look something like this (note the four occurances of message 830, each following another message):


If you examine the contents of the lines referenced in the 830 messages, you will find that they are where the functions referred to in the "Ignoring return value of function" messages are defined:


The beauty of this within the development environment is of course that by double clicking on the "Location cited in prior message" issue, you will be taken directly to the definition of the function concerned, so you can easily view its definition and (in this context) see what it returns.

Incidentally, there is a similar message - 831 ("Reference cited in prior message") - which identifies other supporting information for a message. It works in exactly the same way as 830.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)