A commercial software static analysis tool produced by Vector Informatik (originally by Gimpel Software) for the C and C++ languages. PC-lint examines C or C++ programs and finds potential problem areas. PC-lint can look across several modules which allows it to determine issues that a compiler normally does not point out. Options also exist for the detection of MISRA rule violations. This tag is for questions regarding the usage of PC-lint/PC lint Plus.
Questions tagged [pc-lint]
137 questions
2
votes
1 answer
How to get PC-Lint to print fully qualified function name in message?
I'm using PC-Lint to generate an XML file that contains all the warnings generated by a run.
The process works almost flawlessly, with a rather annoying exception. I can't get the message format to print the fully qualified function name where the…

joce
- 9,624
- 19
- 56
- 74
2
votes
2 answers
How to integrate PC-lint with Visual C++ 2008
My company has the PC-lint executable lint-nt.exe.
I am trying to use this to integrate PC-lint with MS Visual Studio 2008 to analyze .c/.cpp sources. But I have no success with getting that to work.
I read:…

goldenmean
- 18,376
- 54
- 154
- 211
2
votes
1 answer
Any tips for speeding up static analysis tool PC-Lint? Any experiences using .LOB files?
I'm interested in learning the main factors which affect PC-lint-ing time. I'm aware of a few such as -passes(#) which will increase the time PC-Lint takes (increase linearly?) or that reducing the messages which are output does not affect the…

alphaOri
- 87
- 3
- 6
1
vote
6 answers
Expected an expression error, found 'WIN32'
I have following C++ code and running PC lint on code.
Question 1:
#if !WIN32
#define ULONG_MAX 0xffffffff
#endif
Above code is throwing an lint error as follows
Error 26: Expected an expression, found 'WIN32'
Error 30: Expected an integer…

venkysmarty
- 11,099
- 25
- 101
- 184
1
vote
3 answers
MISRA C 2012 Rule 11.4 violation
Facing Issue related to MISRA C 2012 Rule 11.4 violation.
Using PC-Lint Plus for rule check.
Keil uVision V5.38.0.0
Error:
conversion between object pointer type 'GPIO_Type *' and integer type 'unsigned int' [MISRA 2012 Rule 11.4, advisory]```
uint…

rock123A
- 82
- 2
- 11
1
vote
0 answers
Why is FlexeLint giving errors and warnings on C++11 constructs?
I'm working with FlexeLint 9.00L and am having a problem with it recognizing my C++11 code as proper.
The command I'm using is:
flint -os[outputFile] -u lint_options.lnt Bus.cpp
In my lint_options.lnt file I have (amongst other options)…

DesertBroncoFan
- 65
- 1
- 12
1
vote
2 answers
cannot cast 'float64' to different essential type 'unsigned16' [MISRA 2012 Rule 10.8, required]
cannot cast 'float64' to different essential type 'unsigned16' [MISRA 2012 Rule 10.8, required]
double x, y;
#define MIN 2.0
uint16_t z = (uint16_t) ((x * MIN) + y);
How can I resolve this line throwing pc-lint note?

user8454941
- 11
- 2
1
vote
0 answers
PC Lint header error parsing, Error 129: declaration expected, identifier 'T_TEST_ID ' ignored
Running PC Lint analysis (v9.0), I am getting these errors on a source file test_file.c which is including a header file test_file.h
Here is how the enum is declared in test_file.h:
typedef enum {
id_0,
id_1,
...
max_id
} T_TEST_ID;
This is…

stk_user
- 21
- 1
1
vote
1 answer
PC-Lint How to exclude messages from include files?
I am using PC lint for my C project. And I want to exclude all the messages related to include files. I have tried to add +libh(*.h) or +libh(*core_cm4.h) but I am still getting all the errors from include files. The only time I am not getting…

deanavenger
- 582
- 1
- 7
- 24
1
vote
1 answer
CMake and PC-Lint Plus - how do I pass CMake's include directory list to Lint?
I'm trying to incorporate PC-Lint Plus into my cmake project, mainly per PC-Lint needs a list of all include paths for the files to be scanned. How to get a list of all include paths recursively needed by a target in CMake?.
PC-Lint is getting…

bizaff
- 169
- 7
1
vote
0 answers
Why warning directive in C throws LINT error?
I am using GNU C and IAR compilers with my ARM Cortex M projects using MCUXpresso IDE. I am using PC-LINT checker.
Under IAR compiler I have a problem with #warning directive throwing two LINT errors
#warning Dont compile it in RELEASE //example…

Pierwiastek
- 134
- 9
1
vote
1 answer
Suppressing messages from the PC Lint Global Wrap up?
I am already setting the 3rd party code files as libraries in my project, but I am still getting messages from those files (libraries) in the Global Wrap-up in the PC Lint output file. Is there a way to suppress the messages from the libraries in…

stk_user
- 21
- 1
1
vote
1 answer
global macro 'INVALIDATION_ADDR' of type 'void' not referenced [MISRA 2012 Rule 2.5, advisory]
I observed the above warning when I define MACRO but not used anywhere in code. But at some instance, I am getting this warning for the MACRO which is being used in code as well.
I have defined macro - INVALIDATION_ADDR and used at some places as…

kapilddit
- 1,729
- 4
- 26
- 51
1
vote
2 answers
Unpermitted operand to operator '++' [MISRA 2012 Rule 10.1, required]
I am trying to fix the Misra warning for the modules written by others. I observed that ++ operation is being used on the enum.
I referred SE question which talks on the same topic. How do I resolve this error? Do I need to suggest the module…

kapilddit
- 1,729
- 4
- 26
- 51
1
vote
1 answer
use of '#undef' is discouraged: 'ssCmd' [MISRA 2012 Rule 20.5, advisory]
I am defining some macro - #define temporary inside code, which I have #undef after being used.
Is it not allowed to #undef MACRO?
void c_cmd(unsinged char *com)
{
int abc = com[0];
int res = 0;
switch(abc)
{
case 1:
#define…

kapilddit
- 1,729
- 4
- 26
- 51