This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PC Lint and compil options

Hi,

I some difficults with PC Lint and Keil uvision2. If anybody can help me?


1.PC Lint generate errors with the following source code:

*********************************************
line0: #ifdef DATA_OWNER
line1: #define DATA
line2: #else
line3: #define DATA extern
line4: #endif

line5: DATA bit B_FreezingErr;
line6: DATA U8Bit CheckAck;

*********************************************

This Code means:
-if DATA_OWNER is defined then DATA equal to nothing.
-if DATA_OWNER is not defined then DATA equal to extern.
These source code is using for headers files.

For these codes,PC Lint generate these errors messages:
-error 10:Expecting ';'
-error 19:Useless Declaration

These 2 errors appear for the line 6.
And 'U8Bit' as defined: "#define U8Bit unsigned char"


2.PC Lint generate errors because it doesn't use the compil options of
Keil. Compil options are defined in 'Options for Target','C166',
'Preprocessor Symbols'. And my compil options are:

-NO_EMUL,COD_CHK,NO_INSTRUM,NO_INTEG_DIM.

PC Lint generate error messages for the following code:

*********************************************

#ifndef TU_SIM
sfr PORT0_L = 0xFF00;
#ifdef EMUL
sbit C_SCL= C_PORT8 ^ 3;

#else
sbit C_SCL = C_PORT3 ^ 13;

#endif

#else

DATA U8Bit PORT0_L ;

#endif

*********************************************

The error messages are:

"Error 14:symbol 'PORTO_L' previously defined (line ..,file C:\....)"
It says 'PORTO_L' is previously defined in the same file.

"Error 14:symbol 'C_SCL' previously defined (line ..,file C:\....)"
It says 'C_SCL' is previously defined in the same file.


Thanks in advance.

0