[PATCH v2 4/4] main_help.c: Unchecked return value from library (CID #1437650)

Ryan Long thisisryanlong at gmail.com
Fri Mar 5 19:47:10 UTC 2021


CID 1437650: Unchecked return value from library in rtems_shell_help().

Closes #4291
---
 cpukit/libmisc/shell/main_help.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/libmisc/shell/main_help.c b/cpukit/libmisc/shell/main_help.c
index 611f2e0..9f59e9d 100644
--- a/cpukit/libmisc/shell/main_help.c
+++ b/cpukit/libmisc/shell/main_help.c
@@ -119,7 +119,8 @@ static int rtems_shell_help(
     rtems_shell_cmd_t *shell_cmd;
 
     if (lines && (line > lines)) {
-      printf("Press any key to continue...");getchar();
+      printf("Press any key to continue...");
+      (void) getchar(); /* we only want to know a character was pressed */
       printf("\n");
       line = 0;
     }
-- 
1.8.3.1



More information about the devel mailing list