[RTEMS Project] #2710: smsc9218i.c: 4 * Suspicious condition

RTEMS trac trac at rtems.org
Sat May 14 15:26:14 UTC 2016


#2710: smsc9218i.c: 4 * Suspicious condition
---------------------+--------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  4.11.1
Component:  General  |    Version:  4.10
 Severity:  normal   |   Keywords:
---------------------+--------------------
 1.

 rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c:249]:
 (style) Suspicious condition (assignment + comparison); Clarify expression
 with parentheses

 Source code is

    (busy = (regs->mac_csr_cmd & SMSC9218I_MAC_CSR_CMD_BUSY) != 0)

 Maybe better code

    ((busy = (regs->mac_csr_cmd & SMSC9218I_MAC_CSR_CMD_BUSY)) != 0)

 Some duplicates:

 [rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c:312]:
 (style) Suspicious condition (assignment + comparison); Clarify expression
 with parentheses
 rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c:1556]:
 (style) Suspicious condition (assignment + comparison); Clarify expression
 with parentheses.
 rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/network/smsc9218i.c:1791]:
 (style) Suspicious condition (assignment + comparison); Clarify expression
 with parentheses.

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


More information about the bugs mailing list