Click here to Skip to main content
15,887,027 members
Articles / Programming Languages / C

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

Rate me:
Please Sign up or sign in to vote.
4.33/5 (2 votes)
3 Aug 2012CPOL1 min read 57.5K   8   3
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.

This article was originally posted at http://www.riverblade.co.uk/rss.php

License

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


Written By
Founder Riverblade Limited
United Kingdom United Kingdom
I haven't always written software for a living. When I graduated from Surrey University in 1989, it was with an Electronic Engineering degree, but unfortunately that never really gave me the opportunity to do anything particularly interesting (with the possible exception of designing Darth Vader's Codpiece * for the UK Army in 1990).
    * Also known as the Standard Army Bootswitch. But that's another story...
Since the opportunity arose to lead a software team developing C++ software for Avionic Test Systems in 1996, I've not looked back. More recently I've been involved in the development of subsea acoustic navigation systems, digital TV broadcast systems, port security/tracking systems, and most recently software development tools with my own company, Riverblade Ltd.

One of my personal specialities is IDE plug-in development. ResOrg was my first attempt at a plug-in, but my day to day work is with Visual Lint, an interactive code analysis tool environment with works within the Visual Studio and Eclipse IDEs or on build servers.

I love lots of things, but particularly music, photography and anything connected with history or engineering. I despise ignorant, intolerant and obstructive people - and it shows...I can be a bolshy cow if you wind me up the wrong way...Laugh | :laugh:

I'm currently based 15 minutes walk from the beach in Bournemouth on the south coast of England. Since I moved here I've grown to love the place - even if it is full of grockles in Summer!

Comments and Discussions

 
GeneralSome stuff missing Pin
Hans Dietrich7-Apr-09 5:54
mentorHans Dietrich7-Apr-09 5:54 
GeneralRe: Some stuff missing Pin
Anna-Jayne Metcalfe7-Apr-09 5:58
Anna-Jayne Metcalfe7-Apr-09 5:58 
GeneralRe: Some stuff missing Pin
Anna-Jayne Metcalfe7-Apr-09 6:13
Anna-Jayne Metcalfe7-Apr-09 6:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.