Closed ldenisey closed 4 years ago
When compiling with Arduino 1.8.9, I get the following warning :
sketch\LGT_SCR.cpp:401:44: warning: iteration 27 invokes undefined behavior [-Waggressive-loop-optimizations] data_storage[6 + i] = card.longFilename[i]; ^
Indeed, when looking at it, longFilename is defined here : https://github.com/LONGER3D/Marlin1.1.9_LGT0.3.x_Alfawise_Ux0Pro/blob/master/Marlin/cardreader.h#L122, with a size of 27 : https://github.com/LONGER3D/Marlin1.1.9_LGT0.3.x_Alfawise_Ux0Pro/blob/master/Marlin/SdFatConfig.h#L114
When compiling with Arduino 1.8.9, I get the following warning :
sketch\LGT_SCR.cpp:401:44: warning: iteration 27 invokes undefined behavior [-Waggressive-loop-optimizations] data_storage[6 + i] = card.longFilename[i]; ^
Indeed, when looking at it, longFilename is defined here : https://github.com/LONGER3D/Marlin1.1.9_LGT0.3.x_Alfawise_Ux0Pro/blob/master/Marlin/cardreader.h#L122, with a size of 27 : https://github.com/LONGER3D/Marlin1.1.9_LGT0.3.x_Alfawise_Ux0Pro/blob/master/Marlin/SdFatConfig.h#L114