summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank K├╝hndel <frank.kuehndel@embedded-brains.de>2020-10-12 17:11:18 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-15 19:12:15 +0200
commit2361b2c8cb73267342d603514d86b003932603a5 (patch)
tree195f41ba0899306c6cdced164407e14680e46208
parent0a761a58c9097a0de04baf970f260594618090e8 (diff)
shell/shell.c: Fix an implicit type cast
With some compiler warnings enabled, the implicit cast may trigger a compiler warning. The explicit cast avoids this.
-rw-r--r--cpukit/libmisc/shell/shell.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index 77214d0be4..c5fc1f5c48 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -620,7 +620,9 @@ static int rtems_shell_line_editor(
case 21: /* Control-U */
if (col > 0)
{
- int clen = strlen (line);
+ /* strlen() returns size_t but fprintf("%*...") below requires
+ * int! */
+ int clen = (int) strlen (line);
int bs;
strcpy (line, line + col);