[RTEMS Project] #3352: Warning in all lpc176x variants

RTEMS trac trac at rtems.org
Fri Mar 16 16:50:30 UTC 2018


#3352: Warning in all lpc176x variants
----------------------------+--------------------
  Reporter:  Joel Sherrill  |      Owner:  (none)
      Type:  defect         |     Status:  new
  Priority:  normal         |  Milestone:
 Component:  admin          |    Version:
  Severity:  normal         |   Keywords:
Blocked By:                 |   Blocking:
----------------------------+--------------------
 bsps/arm/lpc176x/include/bsp.h defines OPERATION_COUNT in an attempt to
 override the autoconf generated constant. This conflicts and results in
 this warning:

 /home/joel/rtems-work/rtems-
 testing/rtems/rtems/bsps/arm/lpc176x/include/bsp.h:42:0: warning:
 "OPERATION_COUNT" redefined

 I understand why this is lowered by the BSP but the mechanism used is not
 good. And if the include file order is different between tests, you could
 get the BSP value or the autoconf generated value based on the order.

 This warning needs to be fixed and a safer mechanism for a BSP to override
 OPERATION_COUNT defined.

 My first suggestion is to use BSP_OPERATION_COUNT and add logic to one of
 the common test .h files to undef OPERATION_COUNT and redefine it to
 BSP_OPERATION_COUNT if it is defined.

 A safer option might be to change the name of the autoconf generated
 variable to OPERATION_COUNT_DEFAULT and rely on logic in a common test
 support .h to define OPERATION_COUNT to OPERATION_COUNT_DEFAULT or
 BSP_OPERATION_DEFAULT.

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


More information about the bugs mailing list