From d806dfe801bb47ed62b50501ce8b5954d4baded8 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Sun, 22 Mar 2020 10:14:12 +1300 Subject: [PATCH] Shell: Use size_t for SH_DEBUG vector iteration We missed this when switching to size_t for vector sizing as this code is not normally compiled. --- Shell/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shell/main.cpp b/Shell/main.cpp index 5e8877a563..cf7f330666 100644 --- a/Shell/main.cpp +++ b/Shell/main.cpp @@ -755,15 +755,15 @@ static int run_command(const String& cmd) #ifdef SH_DEBUG for (auto& command : commands) { - for (int i = 0; i < command.subcommands.size(); ++i) { - for (int j = 0; j < i; ++j) + for (size_t i = 0; i < command.subcommands.size(); ++i) { + for (size_t j = 0; j < i; ++j) dbgprintf(" "); for (auto& arg : command.subcommands[i].args) { dbgprintf("<%s> ", arg.characters()); } dbgprintf("\n"); for (auto& redirecton : command.subcommands[i].redirections) { - for (int j = 0; j < i; ++j) + for (size_t j = 0; j < i; ++j) dbgprintf(" "); dbgprintf(" "); switch (redirecton.type) {