#4237 closed defect (fixed)

consolesimpletask.c: Two Unchecked Return Values Spotted by Coverity

Reported by: Ryan Long Owned by: Ryan Long <ryan.long@…>
Priority: normal Milestone: 6.1
Component: lib Version: 6
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

CID 1437625: Unchecked return value from call to rtems_task_create().
CID 1472765: Unchecked return value from call to rtems_task_start().

Snippet from Coverity output.

234  IMFS_add_node( "/dev", &cons->Node, NULL );
235
   	
CID 1437625 (#1 of 1): Unchecked return value (CHECKED_RETURN)
1. check_return: Calling rtems_task_create without checking return value (as is done elsewhere 22 out of 25 times).
236  rtems_task_create(
237    rtems_build_name('C', 'O', 'N', 'S'),
238    RTEMS_MAXIMUM_PRIORITY - 1,
239    RTEMS_MINIMUM_STACK_SIZE,
240    RTEMS_DEFAULT_ATTRIBUTES,
241    RTEMS_DEFAULT_MODES,
242    &cons->task
243  );
244
   	CID 1472765: Unchecked return value (CHECKED_RETURN) [select issue]
245  rtems_task_start(
246    cons->task,
247    _Console_simple_task_Task,
248    (rtems_task_argument) cons
249  );
250}

Change History (4)

comment:1 Changed on 02/12/21 at 20:16:29 by Joel Sherrill

Description: modified (diff)
Summary: Fix CID #1437625consolesimpletask.c: Unchecked Return Value (CID #1437625)

comment:2 Changed on 02/12/21 at 20:20:26 by Joel Sherrill

Description: modified (diff)
Summary: consolesimpletask.c: Unchecked Return Value (CID #1437625)consolesimpletask.c: Two Unchecked Return Values (CID #1437625 and #1472765)

comment:3 Changed on 02/12/21 at 20:31:47 by Joel Sherrill

Summary: consolesimpletask.c: Two Unchecked Return Values (CID #1437625 and #1472765)consolesimpletask.c: Two Unchecked Return Values Spotted by Coverity

comment:4 Changed on 02/12/21 at 23:13:50 by Ryan Long <ryan.long@…>

Owner: set to Ryan Long <ryan.long@…>
Resolution: fixed
Status: newclosed

In 14f5a05/rtems:

consolesimpletask.c: Fix Two Unchecked Return Values (CID #1437625 and #1472765)

CID 1437625: Unchecked return value from call to rtems_task_create().
CID 1472765: Unchecked return value from call to rtems_task_start().

Closes #4237.

Note: See TracTickets for help on using tickets.