Page 1 of 1

Warming: incompatible pointer type

Posted: Wed Jul 28, 2021 7:04 pm
by bkohler
Hello,

When my project is in compiling face, there is a message:

C:\Users\benko\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c: In function 'spiTransferBytesNL':
C:\Users\benko\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
uint8_t * last_out8 = &result[c_longs-1];
^
C:\Users\benko\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
uint8_t * last_data8 = &last_data;

Thanks in advance for feedback,

Br, Ben

^

Re: Warming: incompatible pointer type

Posted: Fri Aug 06, 2021 12:33 pm
by mbratch
The message is pretty direct. What do the declarations of `result` and `last_data` look like. I suspect you need to explicitly cast, but that's not always a a good idea as you may be doing something fundamentally wrong