We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
Thank you Drew Davis, Fortunately there are people nice people as you, who's solve others difficults. I tried the option -p ( it solve my problem ). It run the Pre-processor( If I am not mistaken ) before PC Lint. And then, Error messages not appear. Thanks a lot.