<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear Dr. Joel,<div><br></div><div>Thank you for your reply. I did a grep on the root rtems folder and I came to know that ISR_LOCK_INITIALIZER is being used by intr.h and isrlock.h inside leon3's include directory.  It includes various macros like :</div><div><br></div><div>#if defined( RTEMS_SMP )</div><div>  #define ISR_LOCK_INITIALIZER( _name ) \</div><div><br></div><div>and </div><div><br></div><div>#define RTEMS_INTERRUPT_LOCK_INITIALIZER( _name ) ISR_LOCK_INITIALIZER( _name )</div><div><br></div><div>I couldn't find the implementation of the function  ISR_LOCK_INITIALIZER( ) anywhere. Is there a isrlock.c present somewhere? I couldn't find any helpful references for RTEMS_INTERRUPT_LOCK_INITIALIZER too. Am i missing something?<br></div><div><br></div><div>Please let me know.</div><div><br></div><div>Thanks,</div><div>Richi.</div><div><br></div><div><br></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 19, 2020 at 10:52 PM Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 19, 2020, 9:59 AM Richi Dubey <<a href="mailto:richidubey@gmail.com" target="_blank">richidubey@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hey everyone,<br><div><br></div><div><div>In the Covid Code-in update by Dr. Joel, he mentioned that the RTEMS could use some help to remove warnings from the code. In the link(<a href="https://ftp.rtems.org/pub/rtems/people/joel/warnings/warnings-5-20200408/warnings-all-5-20200408.txt" rel="noreferrer" target="_blank">https://ftp.rtems.org/pub/rtems/people/joel/warnings/warnings-5-20200408/warnings-all-5-20200408.txt</a>) of warnings for RTEMS 5, one of the warning is: </div><div><br></div><div><span id="gmail-m_2430427957782359796m_-5430618869925456466gmail-m_-7746092360137926371gmail-docs-internal-guid-daa4333b-7fff-3633-5bdb-8f838a271d50"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">log/sparc-leon3.log:../../../../../../rtems/c/src/../../testsuites/sptests/sp37/init.c:172:21: warning: unused variable 'name' [-Wunused-variable]</span></span></div><div><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">l</span><span style="background-color:transparent;color:rgb(0,0,0);font-family:Arial;font-size:11pt;white-space:pre-wrap">og/sparc-leon3.log:../../../../../../rtems/c/src/../../testsuites/sptests/sp37/init.c:172:21: warning: 'name' defined but not used [-Wunused-const-variable=]</span></div><div><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><br></span></div><div><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap"><br></span></div><div><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;white-space:pre-wrap">On opening init.c from </span><font color="#000000" face="Arial"><span style="font-size:14.6667px;white-space:pre-wrap">~/quick-start/src/rtems/testsuites/sptests/sp37/. Lines 172 to 175 are: </span></font></div><div><font color="#000000" face="Arial"><span style="font-size:14.6667px;white-space:pre-wrap"><br></span></font></div><div><span style="background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;font-size:14.6667px;white-space:pre-wrap"><font color="#000000" face="Arial"><div> static const char name[] = "test";</div><div>  ISR_Level normal_interrupt_level = _ISR_Get_level();</div><div>  ISR_lock_Control initialized = ISR_LOCK_INITIALIZER( name );</div><div>  ISR_lock_Control zero_initialized;</div><div><br></div><div>We can see that the name variable is being used in line 174(and later on 3 more times, outside any conditional blocks). Why would Dr. Joel get such a warning then?</div></font></span></div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Does <span style="font-family:arial;font-size:14.6667px;white-space:pre-wrap">ISR_LOCK_INITIALIZER actually use the name? It possibly only uses it when RTEMS_DEBUG is enabled. Check that. </span></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><div><span style="background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;vertical-align:baseline;font-size:14.6667px;white-space:pre-wrap"><font color="#000000" face="Arial"><div><span style="background-color:transparent"><br></span></div><div><span style="background-color:transparent">Thanks,</span></div><div><span style="background-color:transparent">Richi. </span><br></div></font></span></div></div></div></div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" rel="noreferrer" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div></div>
</blockquote></div>