RTEMS | Extra semi-colons on use of SPIN_DECLARE (#5483)

Joel Sherrill (@joel) gitlab at rtems.org
Sat Feb 7 17:16:32 UTC 2026



Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5483



## Summary

I turned on _-pedantic_ to see if there was any value fixing some of the issues pointed out. 

```
../../../bsps/shared/grlib/amba/ahbstat.c:98:30: warning: extra semicolon in struct or union specified [-Wpedantic]
   98 |         SPIN_DECLARE(devlock);
      |                              ^
      |                 
```

_SPIN_DECLARE_ renames _RTEMS_INTERRUPT_LOCK_MEMBER_ which includes a note that it should not be followed by a semi-colon.

```
 * @par Notes
 * Do not add a ";" after this macro.
 */

#if ISR_LOCK_NEEDS_OBJECT
  #define RTEMS_INTERRUPT_LOCK_MEMBER( _designator ) \
  rtems_interrupt_lock _designator;
#else
  #define RTEMS_INTERRUPT_LOCK_MEMBER( _designator )
#endif
```


## Steps to reproduce

This requires modifying _optwarn.yml_ as follows:

```
+  #- -Werror
+  - -pedantic
```

There will be lots of -pedantic warnings which we want to ignore and a few we want to fix.


<!-- Pre-set options
- milestone
-->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5483
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260207/43003aa5/attachment.htm>


More information about the bugs mailing list