On Wed, Apr 22, 2020 at 1:55 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote:
> On 22/04/2020 16:12, Joel Sherrill wrote: > > > the code I added is an accepted idiom for telling the compiler a > > variable or parameter is used for its analysis purposes. Does this > > make sense? > > > > diff --git a/cpukit/include/rtems/score/isrlock.h > > b/cpukit/include/rtems/score/i > > index 14ea88b..52645a3 100644 > > --- a/cpukit/include/rtems/score/isrlock.h > > +++ b/cpukit/include/rtems/score/isrlock.h > > @@ -147,7 +147,7 @@ typedef struct { > > { SMP_LOCK_INITIALIZER( _name ) } > > #else > > #define ISR_LOCK_INITIALIZER( _name ) \ > > - { } > > + { (void) (_name); } > > #endif > For a function-like macro it would be all right, however, this if an > initializer macro. I guess this test needs some #ifdef RTEMS_SMP to fix > the warnings. > Yeah. I didn't actually compile it. It looked like a function macro and terminated for uniprocessor systems like that. Other cases may need indicate something else. Just another example of how warnings can look easy. :) --joel > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel