From 08b56fe1a4e41861da2234888c79fdd7a5865a2b Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Wed, 25 Jul 2018 15:51:00 +0200 Subject: [PATCH] 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. --- Firmware/cardreader.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Firmware/cardreader.cpp b/Firmware/cardreader.cpp index e59b964c..82312efb 100644 --- a/Firmware/cardreader.cpp +++ b/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 } }