[RTEMS Project] #4863: Operations evaluation order.

RTEMS trac trac at rtems.org
Thu Feb 23 12:37:47 UTC 2023


#4863: Operations evaluation order.
----------------------------+---------------------------
  Reporter:  Daniel Páscoa  |      Owner:  (none)
      Type:  defect         |     Status:  new
  Priority:  normal         |  Milestone:
 Component:  admin          |    Version:  6
  Severity:  normal         |   Keywords:  qualification
Blocked By:                 |   Blocking:
----------------------------+---------------------------
 Within cpukit\include\rtems\score\objectimpl.h line 545 one has:
 if ( !the_api || the_api > OBJECTS_APIS_LAST )

 This shall be equivalent to “if ( (!the_api) || (the_api >
 OBJECTS_APIS_LAST ))”, but at first glance, this is not always obvious to
 everyone and one might need to read further documentation to be fully sure
 of it.

 We would suggest the parenthesis be added so that the code logic is
 straightforward. In this case, one would not call it an ‘excess’ as stated
 within the RTEMS SW Eng. Manual (“Avoid excess parentheses. Learn the
 operator precedence. rules.”).

 **Additional Notes:**
 This ticket was raised as an outcome of the Independent SW Verification
 and Validation (ISVV) for ESA-promoted RTEMS SMP Qualification Data Packs
 (https://rtems-qual.io.esa.int). The original ISVV reference for this
 issue is RTEMS-SMP-CODE-VER-076.

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


More information about the bugs mailing list