Gast
#1149106
Hallo,
warum bekomme ich folgende Warnung:
../Bus.c:200: warning: assignment discards qualifiers from pointer
target type
bei dieser Zuweisung:
busBuffer.msgPtr = busBuffer.msg;
busBuffer ist wie folgt definiert:
typedef struct
{
uint8_t busy; // Flag, not ready for read or sent
uint8_t gotCmd; // Flag, received a command since last change of SEL
uint8_t wait; // Flag, master shall wait
uint8_t msgBytes;// Bytes received
uint8_t dataBytes;// Bytes to be read
uint8_t *msgPtr; // Pointer to byte to transmit or to read
uint8_t msg[ BUSBUFFER_MSG_LEN ];
} BusBuffer_t;
static volatile BusBuffer_t busBuffer;
Am volatile scheint es nicht zu liegen, denn bei
busBuffer.msgPtr = (uint8_t*) busBuffer.msg;
ist der Compiler ruhig!?!
Plattform ist AVRStudio mit aktuellem WinAVR.
Grüsse
Brad