From 6376b683c78ec410ace0765ba91314055b78d927 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Thu, 14 Jan 2021 08:48:29 -0700 Subject: [PATCH] Silence unused parameter warnings --- Marlin/src/lcd/marlinui.cpp | 3 ++- Marlin/src/module/settings.cpp | 2 +- Marlin/src/module/temperature.h | 2 +- Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 430bfcf48..d4e1357e8 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1450,7 +1450,8 @@ void MarlinUI::update() { #if ENABLED(STATUS_MESSAGE_SCROLLING) status_scroll_offset = 0; #endif - + #else // HAS_SPI_LCD + UNUSED(persist); #endif TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message)); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 0728840f5..58cdd5296 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -2363,7 +2363,7 @@ void MarlinSettings::postprocess() { #if ENABLED(AUTO_BED_LEVELING_UBL) inline void ubl_invalid_slot(const int s) { - #if ENABLED(EEPROM_CHITCHAT) + #if BOTH(EEPROM_CHITCHAT, DEBUG_OUT) DEBUG_ECHOLNPGM("?Invalid slot."); DEBUG_ECHO(s); DEBUG_ECHOLNPGM(" mesh slots available."); diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index aa4f2e763..f570fe210 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -69,7 +69,7 @@ hotend_pid_t; typedef IF<(LPQ_MAX_LEN > 255), uint16_t, uint8_t>::type lpq_ptr_t; #endif -#define PID_PARAM(F,H) _PID_##F(TERN(PID_PARAMS_PER_HOTEND, H, 0)) +#define PID_PARAM(F,H) _PID_##F(TERN(PID_PARAMS_PER_HOTEND, H, 0 & H)) // Always use 'H' to suppress warning #define _PID_Kp(H) TERN(PIDTEMP, Temperature::temp_hotend[H].pid.Kp, NAN) #define _PID_Ki(H) TERN(PIDTEMP, Temperature::temp_hotend[H].pid.Ki, NAN) #define _PID_Kd(H) TERN(PIDTEMP, Temperature::temp_hotend[H].pid.Kd, NAN) diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h index e6980a03a..578912136 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h @@ -70,7 +70,7 @@ class Sd2Card { bool readBlock(uint32_t block, uint8_t* dst); bool writeBlock(uint32_t blockNumber, const uint8_t* src); - bool readCSD(csd_t* csd) { return true; }; + bool readCSD(csd_t*) { return true; } uint32_t cardSize(); static bool isInserted();