From 5ec1a8bb2b0708c3f94f162e71621f662554ce6f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 25 Mar 2020 14:51:22 -0500 Subject: [PATCH] Fix M0 unused var warning --- Marlin/src/gcode/lcd/M0_M1.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 2176693209..20ce55bd78 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -56,9 +56,11 @@ void GcodeSuite::M0_M1() { planner.synchronize(); - const bool seenQ = parser.seen('Q'); - #if HAS_LEDS_OFF_FLAG - if (seenQ) printerEventLEDs.onPrintCompleted(); // Change LED color for Print Completed + #if HAS_LCD_MENU || HAS_LEDS_OFF_FLAG + const bool seenQ = parser.seen('Q'); + #if HAS_LEDS_OFF_FLAG + if (seenQ) printerEventLEDs.onPrintCompleted(); // Change LED color for Print Completed + #endif #endif #if HAS_LCD_MENU