From 2159cb9aec0883ca73e9de79d1309244015f13b3 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Fri, 3 Jan 2020 19:36:52 +0100 Subject: [PATCH] Use correct type for printf field size specifier Formatting options for printf family of functions use int as a type for formatting a field size. --- src/shell/shell_cmds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index ed5e615c..1c8020b6 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -649,8 +649,8 @@ void DOS_Shell::CMD_DIR(char * args) { // if (optW) { if (is_dir) { - const size_t namelen = strlen(name); - WriteOut("[%s]%*s", name, (14 - namelen), ""); + const int length = static_cast(strlen(name)); + WriteOut("[%s]%*s", name, (14 - length), ""); } else { WriteOut("%-16s", name); }