#4258 closed defect (fixed)

printertask.c: Unchecked return value errors 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

CID 1399710: Unchecked return value in printer_task().

138      switch ( buffer->action_kind ) {
139        case ACTION_WRITE:
140          write( fd, &buffer->data[ 0 ], buffer->action_data.size );
141          printer_task_append_buffer( ctx, &ctx->free_buffers, buffer );
   4. Breaking from switch.
   8. Breaking from switch.
   15. Breaking from switch.
142          break;
143        case ACTION_DRAIN:
   CID 1399710 (#1 of 1): Unchecked return value (CHECKED_RETURN)19. check_return: Calling fsync without checking return value (as is done elsewhere 4 out of 5 times).
144          fsync(fd);

Change History (2)

comment:1 Changed on 02/19/21 at 21:47:12 by Ryan Long

Summary: printertask.c: Unchecked return value spotted by Coverityprintertask.c: Unchecked return value errors spotted by Coverity

CID 1472764: Unchecked return value in rtems_print_printer_task().

183  ctx->buffer_size -= sizeof( printer_task_buffer );
184
185  printer->context = ctx;
186  printer->printer = printer_task_printer;
187
   CID 1472764 (#1 of 1): Unchecked return value (CHECKED_RETURN)3. check_return: Calling rtems_task_start without checking return value (as is done elsewhere 22 out of 25 times).
188  rtems_task_start( ctx->task, printer_task, (rtems_task_argument) ctx );

comment:2 Changed on 02/26/21 at 22:56:18 by Ryan Long <ryan.long@…>

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

In 1b322a6/rtems:

printertask.c: Fix Unchecked return value (CID #1399710)

CID 1399710: Unchecked return value in printer_task().
CID 1472764: Unchecked return value in rtems_print_printer_task().

Closes #4258

Note: See TracTickets for help on using tickets.