From 396434a44530109190be95b6e17f5b7ce1976fcc Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 27 Oct 2016 05:53:44 -0500 Subject: [PATCH] Fix compiler warning in M145 --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 673a46dae..f3588fd28 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5518,8 +5518,8 @@ inline void gcode_M140() { * F */ inline void gcode_M145() { - int8_t material = code_seen('S') ? (int8_t)code_value_int() : 0; - if (material < 0 || material >= COUNT(lcd_preheat_hotend_temp)) { + uint8_t material = code_seen('S') ? (uint8_t)code_value_int() : 0; + if (material >= COUNT(lcd_preheat_hotend_temp)) { SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX); }