[Bug 2073] New: Unnecessary check for alignment and unreachable code in cpukit/score/src/coremsg.c

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Aug 15 09:16:21 UTC 2012


https://www.rtems.org/bugzilla/show_bug.cgi?id=2073

             Bug #: 2073
           Summary: Unnecessary check for alignment and unreachable code
                    in cpukit/score/src/coremsg.c
    Classification: Unclassified
           Product: RTEMS
           Version: 4.10
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: krzysztof.miesowicz at gmail.com


Created attachment 1484
  --> https://www.rtems.org/bugzilla/attachment.cgi?id=1484
Patch to remove unreachable code in coremsg.c

When analyzing coverage report
http://www.rtems.org/ftp/pub/rtems/people/joel/coverage/erc32/erc32-Ospd-20120714-1625/annotated.html#range2
I discovered that there is unreachable and unnecessary if-statement. It gives 2
uncovered instructions. Checking if allocated_message_size is less than
maximum_message_size is unnecessary as above code guarantee that
allocated_message_size will be equal or greater than maximum_message_size. 

I am sending patch as attachment.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list