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 the PC Lint output:
-- Module: .../test_file.c
Error 129: declaration expected, identifier 'T_TEST_ID' ignored
Error 19: Useless Declaration
Info 808: No explicit type given
symbol 'T_TEST_ID', int assumed [MISRA 2012 Rule 8.1, required]
Using the verbose option I can confirm that test_file.h is being included as a header (hdr) to analyze test_file.c:
Including file D:..\test_file.h (hdr)
After these errors I am getting many other errors due to T_TEST_ID is unknown to PC Lint. Any idea on what could be the problem and how to fix it? It seems to be a parsing error but maybe it could be a PC Lint configuration error.
Note: This code is compiling fine, no errors/warnings reported from the compiler.