unused static functions

Aschref Ben-Thabet aschref.ben-thabet at embedded-brains.de
Tue Aug 4 12:35:23 UTC 2020


Dear RTEMS developers Team,
i am a new member focusing now on fixing the GCC10 warnings 
Compiler.this last has told that these both functions are declared but 
not used.
In /rtems/testsuites/libtests/dl10/dl-load.c,the test file includes this 
both functions without further use. that can generate a warning like 
Wunused-function.
can you tell me please for which issue are these static functions in 
this test file declared, and when they have any effect in the test, is 
it helpful to erase them (it fixes the warning)?
staticvoiddl_close (void* handle)
{
intr;
printf ("handle: %p closing\n", handle);
r = dlclose (handle);
if(r != 0)
printf("dlclose failed: %s\n", dlerror()) ;
rtems_test_assert (r == 0);
}
staticintdl_call (void* handle, constchar* func)
{
call_sig call = dlsym (handle, func);
if(call == NULL)
{
printf("dlsym failed: symbol not found: %s\n", func);
return1;
}
call ();
return0;
}
Beste regards
Aschref Ben thabet
Embedded Brains GmbH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200804/71380dfc/attachment.html>


More information about the devel mailing list