unused static functions

Chris Johns chrisj at rtems.org
Wed Aug 5 00:15:06 UTC 2020


On 5/8/20 3:28 am, Joel Sherrill wrote:
> On Tue, Aug 4, 2020 at 11:12 AM Gedare Bloom <gedare at rtems.org
> <mailto:gedare at rtems.org>> wrote:
> 
>     Hello Aschref Ben thabet,
> 
>     On Tue, Aug 4, 2020 at 6:35 AM Aschref Ben-Thabet
>     <aschref.ben-thabet at embedded-brains.de
>     <mailto:aschref.ben-thabet at embedded-brains.de>> wrote:
>     >
>     > 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)?
> 
>     I think these functions are just copied from other dltests. Chris
>     Johns may comment on their elimination.
> 
>     You would want to look at the purpose of the test, and how similar
>     tests are structured. Was it a mistake not to call these functions? Or
>     are they not needed for this test?
> 
> The inclusion of these may generate special relocation records. Chris
> would know that.
> 
> If they have to be there, there are examples on how to disable a specific
> warning around a block of code.  

They are as Gedare says just copied over and not clean up. They can be removed.

Chris


More information about the devel mailing list