[rtems commit] main_help.c: Unchecked return value from library ( CID #1437650)

Joel Sherrill joel at rtems.org
Mon Mar 8 20:56:10 UTC 2021


Module:    rtems
Branch:    master
Commit:    fbab8325a9e15add0efd70dbb2f3e5537f615bf5
Changeset: http://git.rtems.org/rtems/commit/?id=fbab8325a9e15add0efd70dbb2f3e5537f615bf5

Author:    Ryan Long <ryan.long at oarcorp.com>
Date:      Tue Mar  2 13:51:46 2021 -0500

main_help.c: Unchecked return value from library (CID #1437650)

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;
     }



More information about the vc mailing list