On Sat, Oct 22, 2016 at 07:55:01PM +0100, Dominik Vogt wrote:
> Yes, but that does not fix the warning.  "x" is unused because of
> the dummy replacement of the function call.  The compiler does not
> see that if "x = 0" is ever executed, Fxyz_some_func always has a
> non-empty definition.
> 
> I've always used
> 
>   if (FEATURE)
>   {
>     ...
>   }
> 
> Instead of 
> 
>   #if FEATURE
>     ...
>   #endif
> 
> so that the conditional code is always compiled, even if the
> feature is disabled (so we would catch compile errors earlier).
> But in this case, it introduces a warning.

Yes -- which makes this impossible to fix unless the code is changed to be
#ifdef'd out, rather than using 'if (FEATURE)', which makes things harder to
read anyway.

-- Thomas Adam

Reply via email to