Small doubt in a build time warning of sp test of leon3

Richi Dubey richidubey at gmail.com
Thu Apr 23 13:24:43 UTC 2020


Dear Dr. Sherill and Huber,

Thanks a lot for your help. I have made a patch and sent it on devel.
Please check it out.

On Thu, Apr 23, 2020 at 12:28 AM Joel Sherrill <joel at rtems.org> wrote:
>
>
>
> On Wed, Apr 22, 2020 at 1:55 PM Sebastian Huber <sebastian.huber at 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 at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list