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.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to