From c0b75f49b65d2ef07ad85b5505cba7dfdef3adc6 Mon Sep 17 00:00:00 2001 From: Ludy Date: Mon, 19 Nov 2018 00:54:00 +0100 Subject: [PATCH] Fix "no effect" and "unused variable" compile warnings (#12473) --- Marlin/src/core/macros.h | 2 +- Marlin/src/feature/power_loss_recovery.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 11604f8c14..1c57d88c86 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -196,7 +196,7 @@ #define MMM_TO_MMS(MM_M) ((MM_M)/60.0f) #define MMS_TO_MMM(MM_S) ((MM_S)*60.0f) -#define NOOP (0) +#define NOOP (void(0)) #define CEILING(x,y) (((x) + (y) - 1) / (y)) diff --git a/Marlin/src/feature/power_loss_recovery.cpp b/Marlin/src/feature/power_loss_recovery.cpp index 1971dde898..15a1557ebc 100644 --- a/Marlin/src/feature/power_loss_recovery.cpp +++ b/Marlin/src/feature/power_loss_recovery.cpp @@ -216,6 +216,8 @@ void PrintJobRecovery::write() { const int16_t ret = file.write(&info, sizeof(info)); #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) if (ret == -1) SERIAL_ECHOLNPGM("Power-loss file write failed."); + #else + UNUSED(ret); #endif }