Misfittech/nano_stepper

narrowing conversion error

Closed this issue · 4 comments

hg42 commented

when compiling on Arduino IDE on Linux I got this conversion error:

eeprom.cpp:67:90: error: narrowing conversion of '4095' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
 __attribute__((__aligned__(FLASH_ROW_SIZE))) const uint8_t NVM_eeprom[EEPROM_SIZE]={0xFFF};
                                                                                          ^
exit status 1
narrowing conversion of '4095' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

I guess it is a typo...should it be 0xFF?

Or may be I don't understand the special purpose of initializing an uint8_t with 0xFFF :-)

@trampas Can you commit these changes? There are no conflicts and it appears that the nvm size is being set to all F's. I don't see any issue with this change

Changes committed c263fbb

@trampas, can you close this issue?