[PATCH 12/12] main_help.c: Unchecked return value from library (CID #1437650)
Gedare Bloom
gedare at rtems.org
Thu Mar 4 16:31:33 UTC 2021
On Thu, Mar 4, 2021 at 7:06 AM Ryan Long <thisisryanlong at gmail.com> wrote:
>
> 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..c76139e 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
add ' ' after (void)
The comment isn't needed, but if you want to keep it, make it /* */
consistent with others in that file.
> printf("\n");
> line = 0;
> }
> --
> 1.8.3.1
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list