On Sun, Apr 19, 2020, 9:59 AM Richi Dubey <richidu...@gmail.com> wrote:
> Hey everyone, > > 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( > https://ftp.rtems.org/pub/rtems/people/joel/warnings/warnings-5-20200408/warnings-all-5-20200408.txt) > of warnings for RTEMS 5, one of the warning is: > > log/sparc-leon3.log:../../../../../../rtems/c/src/../../testsuites/sptests/sp37/init.c:172:21: > warning: unused variable 'name' [-Wunused-variable] > log/sparc-leon3.log:../../../../../../rtems/c/src/../../testsuites/sptests/sp37/init.c:172:21: > warning: 'name' defined but not used [-Wunused-const-variable=] > > > On opening init.c from ~/quick-start/src/rtems/testsuites/sptests/sp37/. > Lines 172 to 175 are: > > static const char name[] = "test"; > ISR_Level normal_interrupt_level = _ISR_Get_level(); > ISR_lock_Control initialized = ISR_LOCK_INITIALIZER( name ); > ISR_lock_Control zero_initialized; > > 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? > Does ISR_LOCK_INITIALIZER actually use the name? It possibly only uses it when RTEMS_DEBUG is enabled. Check that. > > Thanks, > Richi. > _______________________________________________ > 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