Central | spec: silence unused variables. (!12)

Gedare Bloom (@gedare) gitlab at rtems.org
Thu Oct 9 16:10:12 UTC 2025




Gedare Bloom commented on a discussion on spec/newlib/req/futex-wait.yml: https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/12#note_134071

 >  
 >    static Status_Control Enqueue( TQContext *tq_ctx, TQWait wait )
 >    {
 > +    (void) wait;

This will be allowed as an exception, since we have two competing rules here:
1. Declare local variables at the start of the block.
2. `(void)` unused variables as soon as possible.

A brief discussion led to the conclusion that it seems better from a readability/maintenance perspective to allow the `(void)` before the locals, since this `(void)` is more like an annotation than functional code.

It is still not permitted to mix code and local decls.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/prequal/rtems-central/-/merge_requests/12#note_134071
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/20251009/26450207/attachment.htm>


More information about the bugs mailing list