You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compiling with gcc-arm-none-eabi-9-2019-q4-major fails with the following error:
./stmlib/system/page_storage.h: In member function 'bool plaits::Settings::Init()':
./stmlib/system/page_storage.h:185:24: error: '*((void*)& h +4)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
185 | FLASH_ProgramWord(address, *words);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
./stmlib/system/page_storage.h:171:17: note: '*((void*)& h +4)' was declared here
171 | ChunkHeader h;
| ^
The compiler gets confused because ChunkHeader doesn't default intiialize its varibles and fails to see the assignments next to it.
The fix is to use the initializer_list constructor instead of manually assigning the variables
The text was updated successfully, but these errors were encountered:
compiling with
gcc-arm-none-eabi-9-2019-q4-major
fails with the following error:The compiler gets confused because ChunkHeader doesn't default intiialize its varibles and fails to see the assignments next to it.
The fix is to use the
initializer_list
constructor instead of manually assigning the variablesThe text was updated successfully, but these errors were encountered: