Przeglądaj źródła

Fix probe.cpp warning (#14367)

BigIronGuru 6 lat temu
rodzic
commit
f5afaaef5b
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4
    2
      Marlin/src/module/probe.cpp

+ 4
- 2
Marlin/src/module/probe.cpp Wyświetl plik

663
       #if EXTRA_PROBING
663
       #if EXTRA_PROBING
664
         // Insert Z measurement into probes[]. Keep it sorted ascending.
664
         // Insert Z measurement into probes[]. Keep it sorted ascending.
665
         for (uint8_t i = 0; i <= p; i++) {                            // Iterate the saved Zs to insert the new Z
665
         for (uint8_t i = 0; i <= p; i++) {                            // Iterate the saved Zs to insert the new Z
666
-          if (i == p || probes[i] > z) {       // Last index or new Z is smaller than this Z
666
+          if (i == p || probes[i] > z) {                              // Last index or new Z is smaller than this Z
667
             for (int8_t m = p; --m >= i;) probes[m + 1] = probes[m];  // Shift items down after the insertion point
667
             for (int8_t m = p; --m >= i;) probes[m + 1] = probes[m];  // Shift items down after the insertion point
668
-            probes[i] = z;                     // Insert the new Z measurement
668
+            probes[i] = z;                                            // Insert the new Z measurement
669
             break;                                                    // Only one to insert. Done!
669
             break;                                                    // Only one to insert. Done!
670
           }
670
           }
671
         }
671
         }
672
       #elif TOTAL_PROBING > 2
672
       #elif TOTAL_PROBING > 2
673
         probes_total += z;
673
         probes_total += z;
674
+      #else
675
+        UNUSED(z);
674
       #endif
676
       #endif
675
 
677
 
676
       #if TOTAL_PROBING > 2
678
       #if TOTAL_PROBING > 2

Ładowanie…
Anuluj
Zapisz