[RTEMS Project] #4340: print-ls.c: Unused value error spotted by Coverity

RTEMS trac trac at rtems.org
Fri Mar 12 16:45:41 UTC 2021


#4340: print-ls.c: Unused value error spotted by Coverity
------------------------+--------------------
  Reporter:  Ryan Long  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  6.1
 Component:  lib        |    Version:  6
  Severity:  normal     |   Keywords:
Blocked By:             |   Blocking:
------------------------+--------------------
 CID 1255346: Unused value in rtems_shell_ls_printacol

 {{{
 327                if (col >= numcols) {
    CID 1255346 (#1 of 1): Unused value (UNUSED_VALUE)assigned_value:
 Assigning value from col to chcnt here, but that stored value is
 overwritten before it can be used.
 328                        chcnt = col = 0;
 329                        (void)putchar('\n');
 330                }
    value_overwrite: Overwriting previous write to chcnt with value from
 printaname(globals, p, dp->s_inode, ((globals->f_humanize && 0) ?
 dp->s_size : dp->s_block)).
 331                chcnt = printaname(globals, p, dp->s_inode,
 }}}

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


More information about the bugs mailing list