[RTEMS Project] #4262: rtems-debugger-threads.c: Unchecked return value error spotted by Coverity

RTEMS trac trac at rtems.org
Fri Feb 19 21:36:14 UTC 2021


#4262: rtems-debugger-threads.c: Unchecked return value error spotted by Coverity
---------------------------+-------------------------
  Reporter:  Ryan Long     |      Owner:  Chris Johns
      Type:  defect        |     Status:  new
  Priority:  normal        |  Milestone:  6.1
 Component:  lib/debugger  |    Version:  6
  Severity:  normal        |   Keywords:
Blocked By:                |   Blocking:
---------------------------+-------------------------
 CID 1468688: Unchecked return value in snapshot_thread().

 {{{
 262    else {
 263      rtems_status_code sc;
 264      sc = rtems_task_suspend(id);
 265      if (sc != RTEMS_SUCCESSFUL && sc != RTEMS_ALREADY_SUSPENDED) {
 266        rtems_debugger_printf("error: rtems-db: thread: suspend: %08"
 PRIx32 ": %s\n",
 267                              id, rtems_status_text(sc));
 268        r = -1;
 269      }
 270    }
 271
 272    /*
 273     * Read the target registers into the thread register array.
 274     */
    CID 1468688 (#1 of 1): Unchecked return value (CHECKED_RETURN)17.
 check_return: Calling rtems_debugger_target_read_regs without checking
 return value (as is done elsewhere 4 out of 5 times).
 275    rtems_debugger_target_read_regs(thread);
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4262>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list