Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/02/09 05:55
Read: times


 
#165723 - PC Lint - Error 64
Hello,

I am having 8052 based project. I am using Keil Microvision 3 compiler and am using PC-Lint for error checking and debugging. I created array of pointers as follows:

#include<Reg52.h> /* Keil header file for 8052 variants */

/* Arrays declaration */
code unsigned char *t_names[8]=
{
"L1 ", //line 5
"L2 ",
"L3 ",
"L4 ",
"L5 ",
"L6 ",
"L7 ",
"L8 " //Line 12
};

/* Usage in Code is as follows. A part of code is shown in the form of 2 functions below, which shows the usage of above declared array to send the selected string character by character to Serial Buffer SBUF of 8051 till it encounters a NULL or End Of String. SBUF is defined in Reg52.h header file of Keil. sfr SBUF = 0x99;*/

void print(unsigned char *string)
{
for( ; *string!='' ; string++)/* Loop checking till NULL*/
{
SBUF = *string; /* Sending each character to Serial Port of 8051*/
}
}
void printTheString(unsigned char i)
{
print(t_names[i]);
}

Keil compilation is ok. The program is running fine. But, PC-Lint is generating the Error:
"Error 64: Type mismatch (initialization) (ptrs to signed/unsigned)" at each line from Lines 5 to 12.

Q: What is the error in this type of usage? I can use the pointer arrays in this manner only. There are some more arrays in the code, which were declared and being used in the same style. The project is running fine.

Please suggest,

thanks

List of 15 messages in thread
TopicAuthorDate
PC Lint - Error 64            01/01/70 00:00      
   signed/unsigned            01/01/70 00:00      
      These are LINT Questions            01/01/70 00:00      
         First time with LINT?            01/01/70 00:00      
            Fair I think            01/01/70 00:00      
               The argument is            01/01/70 00:00      
                  Some examples            01/01/70 00:00      
                     There is no such thing as a benign warning            01/01/70 00:00      
         A question of dices            01/01/70 00:00      
            LINT has to deal with C            01/01/70 00:00      
               char != letter            01/01/70 00:00      
      Signed/unsigned char            01/01/70 00:00      
      signed/unsigned            01/01/70 00:00      
         Show it!            01/01/70 00:00      
   How to post legible source code            01/01/70 00:00      

Back to Subject List