[RTEMS Project] #4291: main_help.c: Unchecked return value from library error spotted by Coverity

RTEMS trac trac at rtems.org
Tue Mar 2 18:31:51 UTC 2021


#4291: main_help.c: Unchecked return value from library error spotted by Coverity
-----------------------+---------------------
 Reporter:  Ryan Long  |       Owner:  (none)
     Type:  defect     |      Status:  new
 Priority:  normal     |   Milestone:  6.1
Component:  lib        |     Version:  6
 Severity:  normal     |  Resolution:
 Keywords:             |  Blocked By:
 Blocking:             |
-----------------------+---------------------

Comment (by Ryan Long):

 Accidentally put in the wrong reference to the error in the source.

 {{{
 121    if (lines && (line > lines)) {
    CID 1437650 (#2 of 2): Unchecked return value from library
 (CHECKED_RETURN)7. check_return: Calling getchar() without checking return
 value. This library function may fail and return an error code.
 122      printf("Press any key to continue...");getchar();
 123      printf("\n");
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4291#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list