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

Inconsistent warnings about different data types ?

C51 COMPILER V9.53.0.0
LX51 LINKER/LOCATER V4.66.30.0

I have the following (relevant) lines of code:

extern xdata uint8_t rtu_rx_buf[];
extern xdata uint8_t rtu_tx_buf[];
.
.
.
struct{
    uint8_t func;
    uint16_t start;
    uint16_t qty;
    uint8_t  n;
}xdata *p = &rtu_rx_buf[1];
.
.
.
p = rtu_tx_buf;
.
.
.

The first assignment to 'p' doesn't raise any complaints from the compiler or linker. The second, however, gives me the following warnings:

*** WARNING C182 IN LINE 98 OF C:\blahblahblah.c: pointer to different objects
*** WARNING L25: DATA TYPES DIFFERENT

I'm pretty sure I don't see the difference; am I missing something here?