Browse Source

Fix "no effect" and "unused variable" compile warnings (#12473)

Ludy 6 years ago
parent
commit
c0b75f49b6
2 changed files with 3 additions and 1 deletions
  1. 1
    1
      Marlin/src/core/macros.h
  2. 2
    0
      Marlin/src/feature/power_loss_recovery.cpp

+ 1
- 1
Marlin/src/core/macros.h View File

@@ -196,7 +196,7 @@
196 196
 #define MMM_TO_MMS(MM_M) ((MM_M)/60.0f)
197 197
 #define MMS_TO_MMM(MM_S) ((MM_S)*60.0f)
198 198
 
199
-#define NOOP (0)
199
+#define NOOP (void(0))
200 200
 
201 201
 #define CEILING(x,y) (((x) + (y) - 1) / (y))
202 202
 

+ 2
- 0
Marlin/src/feature/power_loss_recovery.cpp View File

@@ -216,6 +216,8 @@ void PrintJobRecovery::write() {
216 216
   const int16_t ret = file.write(&info, sizeof(info));
217 217
   #if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
218 218
     if (ret == -1) SERIAL_ECHOLNPGM("Power-loss file write failed.");
219
+  #else
220
+    UNUSED(ret);
219 221
   #endif
220 222
 }
221 223
 

Loading…
Cancel
Save