Hi all,
I need a small help in removal of the warning "Function xxx is defined but not used".
Actual Problem:
=============
There is a header file (say a.h) in which some functions are defined as static.
This a.h file is included in 30 files.
The object files of these 30 files are required to obtain the final output binary.
There are only 3 files which uses all the static methods defined in a.h
In remaining files only some of the static functions (defined in a.h) are used.
When i compile the code with -Wall iam getting the warning :
"function xxx defined but not used" for all of the unused static functions (defined in a.h)
Reason for the warning:
==================
We will get a local copy for each of the static methods when "a.h" file is included.(in c/cpp files)
Only some of them (static functions) are used. So compiler issues warning for the un-used functions.
Tried methods:
===========
I tried by removing the static key-word for all the functions (for which the compiler issues warning).
Then i was getting linker error:
"There are multiple defnitions for function xxx".
Could anyone suggest any way to remove these ("function xxx defined but not used") warnings?
Thanks in advance....
Regards,
14341