fablab-luenen / McLighting

The ESP8266 based multi-client lighting gadget
MIT License
215 stars 30 forks source link

error "narrowing conversion of '-1' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]" during the compilation in Arduino IDE #120

Closed crexik closed 3 years ago

crexik commented 3 years ago

Hi, I´m new in Arduino and progrmaing. During the compilation in arduino ide stop compilation with error "narrowing conversion of '-1' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing]"

Error refers to line 193 in McLightning.ino where is this command : "uint8_t strIndex[] = {0, -1};"

Original error text : McLighting.ino: In function 'String getValue(String, char, uint8_t)': McLighting:193:30: error: narrowing conversion of '-1' from 'int' to 'uint8_t' {aka 'unsigned char'} [-Wnarrowing] 193 | uint8_t strIndex[] = {0, -1};

Problem is with -1, but i´m not able to solve this problem.

Version of Arduino IDE is 1.8.15 Arduino board is NODE MCU 1.0 (ESP-12E) I use this modified version for RGBW led strip. Original MCLight Works properly.

seanasimpson commented 3 years ago

I'm having this problem as well.

bpohvoodoo commented 3 years ago

I can not reproduce. Please check the version of your libraries.

cralex11 commented 2 years ago

the same, help!