Warming: incompatible pointer type

bkohler
Posts: 1
Joined: Wed Jul 28, 2021 6:33 am

Warming: incompatible pointer type

Postby bkohler » Wed Jul 28, 2021 7:04 pm

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

^

User avatar
mbratch
Posts: 298
Joined: Fri Jun 11, 2021 1:51 pm

Re: Warming: incompatible pointer type

Postby mbratch » Fri Aug 06, 2021 12:33 pm

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

Who is online

Users browsing this forum: No registered users and 19 guests