johncarlson21 / SV04-Marlin-2.1.x

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
http://marlinfw.org
GNU General Public License v3.0
21 stars 7 forks source link

Fix undefined behavior in powerloss.cpp. #21

Open senbrow opened 1 year ago

senbrow commented 1 year ago

Description

PSTR() is only appropriate when passed to a printf()-style function, and will cause compiler warnings when passed to char* parameters.

Instead, the F() macro should be used in such scenarios.

Benefits

Eliminates all current build warnings (and undefined behavior). This makes the build output clean so new warnings are not accidentally ignored.