From 4ef965cc4024fd8801f9cdc19eda20802a38e2a2 Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Mon, 25 Dec 2017 08:48:54 -0600
Subject: [PATCH] Fix compiler warnings

---
 Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 4 ++--
 Marlin/src/gcode/bedlevel/M420.cpp          | 2 +-
 Marlin/src/lcd/ultralcd.cpp                 | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
index 9c8e452076b..8d9a98025ab 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
@@ -609,7 +609,7 @@
     if (parser.seen('L')) {     // Load Current Mesh Data
       g29_storage_slot = parser.has_value() ? parser.value_int() : storage_slot;
 
-      uint16_t a = settings.calc_num_meshes();
+      int16_t a = settings.calc_num_meshes();
 
       if (!a) {
         SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
@@ -651,7 +651,7 @@
         return;
       }
 
-      uint16_t a = settings.calc_num_meshes();
+      int16_t a = settings.calc_num_meshes();
 
       if (!a) {
         SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp
index 85b016f18d4..740b632544e 100644
--- a/Marlin/src/gcode/bedlevel/M420.cpp
+++ b/Marlin/src/gcode/bedlevel/M420.cpp
@@ -54,7 +54,7 @@ void GcodeSuite::M420() {
 
       #if ENABLED(EEPROM_SETTINGS)
         const int8_t storage_slot = parser.has_value() ? parser.value_int() : ubl.storage_slot;
-        const uint16_t a = settings.calc_num_meshes();
+        const int16_t a = settings.calc_num_meshes();
 
         if (!a) {
           SERIAL_PROTOCOLLNPGM("?EEPROM storage not available.");
diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp
index 105916be45e..e8ab943ede8 100644
--- a/Marlin/src/lcd/ultralcd.cpp
+++ b/Marlin/src/lcd/ultralcd.cpp
@@ -2285,7 +2285,7 @@ void kill_screen(const char* lcd_msg) {
      *    Save Bed Mesh
      */
     void _lcd_ubl_storage_mesh() {
-      uint16_t a = settings.calc_num_meshes();
+      int16_t a = settings.calc_num_meshes();
       START_MENU();
       MENU_BACK(MSG_UBL_LEVEL_BED);
       if (!WITHIN(ubl_storage_slot, 0, a - 1)) {