From 529a88ca26c6d9263a92723e6ed4bf484967729d Mon Sep 17 00:00:00 2001 From: Martine Lenders <m.lenders@fu-berlin.de> Date: Wed, 22 Mar 2017 13:12:02 +0100 Subject: [PATCH] shell_commands: fix sc_vfs warnings --- sys/shell/commands/sc_vfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/shell/commands/sc_vfs.c b/sys/shell/commands/sc_vfs.c index 5571542d56..30811df2ec 100644 --- a/sys/shell/commands/sc_vfs.c +++ b/sys/shell/commands/sc_vfs.c @@ -201,7 +201,7 @@ static int _read_handler(int argc, char **argv) } printf("%02x", buf[k]); } - for (int k = res; k < sizeof(buf); ++k) { + for (unsigned k = res; k < sizeof(buf); ++k) { if ((k % 2) == 0) { putchar(' '); } @@ -269,7 +269,7 @@ static int _cp_handler(int argc, char **argv) eof = 1; break; } - if (res > bufspace) { + if (((unsigned)res) > bufspace) { printf("READ BUFFER OVERRUN! %d > %lu\n", res, (unsigned long)bufspace); vfs_close(fd_in); vfs_close(fd_out); @@ -290,7 +290,7 @@ static int _cp_handler(int argc, char **argv) vfs_close(fd_out); return 4; } - if (res > bufspace) { + if (((unsigned)res) > bufspace) { printf("WRITE BUFFER OVERRUN! %d > %lu\n", res, (unsigned long)bufspace); vfs_close(fd_in); vfs_close(fd_out); -- GitLab