Click here to Skip to main content
Licence CPOL
First Posted 7 Apr 2009
Views 8,960
Bookmarked 5 times

PC-lint 101: What does "previously used .lnt file" mean?

A .lnt file is an "indirect file", which is simply a collection of PC-lint directives. Indirect files can be nested, and are expanded in the order they are encountered by PC-lint.However, if PC-lint encounters the same .lnt file twice in the same context during execution, it will abort with Fatal Er

[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_02_01_archive.xml#2960367227457643954].

A .lnt file is an "indirect file", which is simply a collection of PC-lint directives. Indirect files can be nested, and are expanded in the order they are encountered by PC-lint.

However, if PC-lint encounters the same .lnt file twice in the same context during execution, it will abort with Fatal Error 314 ("Previously used .lnt file"). Hence, if you are seeing this message your analysis has failed due to an error in your PC-lint configuration, or a clash between it and the command line used.

To fix this, simply determine which .lnt file is being duplicated and remove one of the occurances. The former can be done quite simply by running PC-lint with the -vi option, which lists the .lnt files encountered, and where they were found:

Using -vi to identify where indirect files are referenced

If there is a duplicated indirect file in the configuration/command line, you will receive an error 314 when the second instance is encountered:

Using -vi to identify where a duplicated indirect file is referenced

Although this particular example is quite trivial, it illustrates on of the most common causes of fatal error 314 - specifying an indirect file on the command line when it is already in your PC-lint configuration.

In our experience the most common offenders in this are the warning policy file options.lnt and the IDE environment options files env-vc*.lnt - both of which are often specified both on the command line and within std.lnt.

To fix the error, all you need to do is remove the duplicate references to the indrect file in question - either from within your analysis configuration or (if applicable) the command line used to invoke lint-nt.

License

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

About the Author

Anna-Jayne Metcalfe

Founder
Riverblade Limited
United Kingdom United Kingdom

Member

Follow on Twitter Follow on Twitter
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 - but that's another story...).
    * Also known as the Standard Army Bootswitch
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 (with Sonardyne International Ltd), and I'm now working as a freelance software consultant for Riverblade Limited.
 
One of my personal interests is add-in development. The Resource ID Organiser Add-In for Visual C++ was my first attempt at an add-in, and I'm currently working on Visual Lint, an add-in which closely integrates the PC-Lint code analysis tool with Visual Studio .NET. Cool | :cool:
 
I love lots of things, but particularly music, anything historical (especially if it gives me the opportunity to have a bit of sword practice!), reading, chatting and being with friends. 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
 
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!

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120210.1 | Last Updated 8 Jun 2009
Article Copyright 2009 by Anna-Jayne Metcalfe
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid