Browse Source

Fix compiler warning sketch/cardreader.cpp:706:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare].

Remove redundant and masked int d variable.
Fix indentation of presort() to make it clear, that it is not part of for loop.
Marek Bel 5 years ago
parent
commit
08b56fe1a4
1 changed files with 5 additions and 4 deletions
  1. 5 4
      Firmware/cardreader.cpp

+ 5 - 4
Firmware/cardreader.cpp

@@ -702,11 +702,12 @@ void CardReader::updir()
   {
     --workDirDepth;
     workDir = workDirParents[0];
-	int d;
-    for (int d = 0; d < workDirDepth; d++)
-      workDirParents[d] = workDirParents[d+1];
+    for (unsigned int d = 0; d < workDirDepth; d++)
+    {
+        workDirParents[d] = workDirParents[d+1];
+    }
 	#ifdef SDCARD_SORT_ALPHA
-		presort();
+    presort();
 	#endif
   }
 }