[Cython] GCC 4.6 unused-but-set-variable warnings

Stefan Behnel stefan_ml at behnel.de
Fri Jul 29 10:50:35 CEST 2011


Vitja Makarov, 29.07.2011 10:44:
> 2011/7/29 Stefan Behnel:
>> Vitja Makarov, 29.07.2011 10:08:
>>>
>>> this issue isn't critical and even isn't a bug at all.
>>
>> Agreed. It's nothing that needs to be done for 0.15. I just thought you
>> might be interested. :D
>>
>
> Yeah, I tried to do this once but I've found some problems with buffer
> variables.
>
> What to do about local variables:
>
> def foo():
>      a = 1
>
> 'a' is unused here

That's up to the user to fix. However, there may be restrictions regarding 
the signature (inheritance etc.) that the users cannot control, so unused 
*parameters* must not produce warnings.

Stefan


More information about the cython-devel mailing list