From 81e753064ac81292a4fc47ac5fa3f17686bdff7e Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Thu, 3 Jan 2019 07:36:43 -0700 Subject: [PATCH] Fix ExtUI compile warnings and error (#12799) --- Marlin/src/gcode/bedlevel/M420.cpp | 4 +++- Marlin/src/lcd/extensible_ui/ui_api.cpp | 4 ++-- Marlin/src/module/temperature.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 9d287a288..4e5b6c4a2 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -215,7 +215,9 @@ void GcodeSuite::M420() { // Enable leveling if specified, or if previously active set_bed_leveling_enabled(to_enable); - EXIT_M420: + #if HAS_MESH + EXIT_M420: + #endif // Error if leveling failed to enable or reenable if (to_enable && !planner.leveling_active) diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index 2c756cdb3..0f6b9607c 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -635,14 +635,14 @@ namespace ExtUI { pos; card.getfilename_sorted(nr); - return card.filename && card.filename[0] != '\0'; + return card.filename[0] != '\0'; #else return false; #endif } const char* FileList::filename() { - return IFSD(card.longFilename && card.longFilename[0] ? card.longFilename : card.filename, ""); + return IFSD(card.longFilename[0] ? card.longFilename : card.filename, ""); } const char* FileList::shortFilename() { diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 02a53a4e6..31f8f2eb3 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -618,7 +618,7 @@ class Temperature { #endif #endif - #if ENABLED(ULTRA_LCD) + #if ENABLED(ULTRA_LCD) || ENABLED(EXTENSIBLE_UI) static void set_heating_message(const uint8_t e); #endif