From 30438833c68be50d07a8b1e0736e99b7998e05a3 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Mon, 6 Aug 2018 17:07:04 +0200 Subject: [PATCH] Fix compiler warning sketch/Marlin_main.cpp:6584:19: warning: comparison is always true due to limited range of data type [-Wtype-limits] --- Firmware/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index e69ce5a18..3bba1b6b7 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -6580,8 +6580,8 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) else if (code_seen('S')) { // Sxxx Iyyy - Set compensation ustep value S for compensation table index I int16_t usteps = code_value(); if (code_seen('I')) { - byte index = code_value(); - if ((index >= 0) && (index < 5)) { + uint8_t index = code_value(); + if (index < 5) { EEPROM_save_B(EEPROM_PROBE_TEMP_SHIFT + index * 2, &usteps); SERIAL_PROTOCOLLN("OK"); SERIAL_PROTOCOLLN("index, temp, ustep, um");