[RTEMS Project] #2884: src/c/src/lib/libbsp/i386/pc386/include/edid.h: 4 * strange expression ?

RTEMS trac trac at rtems.org
Mon Jan 23 19:14:05 UTC 2017


#2884: src/c/src/lib/libbsp/i386/pc386/include/edid.h: 4 * strange expression ?
---------------------+------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  4.12
Component:  General  |    Version:  4.11
 Severity:  normal   |   Keywords:
---------------------+------------------
 1.

 [src/c/src/lib/libbsp/i386/pc386/include/edid.h:455]: (style) Condition
 '3' is always true

 Source code is

    return (edid->RedYHigh<<2) | (edid->GreenRedLow>>4)&&0x3;

 Maybe better code

    return (edid->RedYHigh<<2) | (edid->GreenRedLow>>4) & 0x3;

 2.

 [src/c/src/lib/libbsp/i386/pc386/include/edid.h:458]: (style) Condition
 '3' is always true
 [src/c/src/lib/libbsp/i386/pc386/include/edid.h:467]: (style) Condition
 '3' is always true
 [src/c/src/lib/libbsp/i386/pc386/include/edid.h:470]: (style) Condition
 '3' is always true

 Duplicates.

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


More information about the bugs mailing list