Click here to Skip to main content
Click here to Skip to main content
Technical Blog

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

, 8 Jun 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

Anna-Jayne Metcalfe
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!
Follow on   Twitter

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411019.1 | Last Updated 8 Jun 2009
Article Copyright 2009 by Anna-Jayne Metcalfe
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid