ソースを参照

Fix probe.cpp warning (#14367)

BigIronGuru 5年前
コミット
f5afaaef5b
1個のファイルの変更4行の追加2行の削除
  1. 4
    2
      Marlin/src/module/probe.cpp

+ 4
- 2
Marlin/src/module/probe.cpp ファイルの表示

@@ -663,14 +663,16 @@ static float run_z_probe() {
663 663
       #if EXTRA_PROBING
664 664
         // Insert Z measurement into probes[]. Keep it sorted ascending.
665 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 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 669
             break;                                                    // Only one to insert. Done!
670 670
           }
671 671
         }
672 672
       #elif TOTAL_PROBING > 2
673 673
         probes_total += z;
674
+      #else
675
+        UNUSED(z);
674 676
       #endif
675 677
 
676 678
       #if TOTAL_PROBING > 2

読み込み中…
キャンセル
保存