-Wunused-function
Warn whenever a static function is declared but not defined or a
non-inline static function is unused. This warning is enabled by
-Wall.

I don't know if there is a flag to warn about unused static inline function.

 ring.h contains many inline functions that are not necessarily used
in all compilation units, so it's just one more function here.

On Wed, Apr 27, 2011 at 5:53 PM, Christophe Fergeau <cferg...@redhat.com> wrote:
> On Wed, Apr 27, 2011 at 10:24:01AM -0400, Marc-André Lureau wrote:
>> > Do you mean it should be #ifdef'ed? or that it's better to add the
>> > equivalent of G_GNUC_UNUSED to the function definition to avoid the
>> > compiler
>> > warning?
>>
>> Is there such warning? I was expecting unused inline functions not to 
>> produce warning.
>> The ifdef shouldn't be necessary. It's just one more functions, similar to 
>> the other provided in ring.h
>
> Not sure we get such a warning with the default spice cflags, but it's easy
> to get gcc to warn about such "dead" code (unused static functions)
>
> Christophe
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>



-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to