shabaz123 / starmap

GNU General Public License v3.0
13 stars 4 forks source link

ESP32 error: narrowing conversion of negative chars #4

Open hpsaturn opened 3 months ago

hpsaturn commented 3 months ago

On ESP32 we have the next issue:

 tests/lib/starmaplib/src/arrays.cpp:153:7: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
hpsaturn commented 3 months ago

I added an untested PR with a possible fix. Right now is compiling ok using the esp32s3 env with PlatformIO

shabaz123 commented 3 months ago

Closing for now since we have the #ifdef solution for ESP32, and the -Wno-narrowing for Pi Pico. But probably the issue will occur for other platforms/build environments so longer-term it would be good to resolve it without these workarounds.