On Thu, Aug 02, 2018 at 09:23:26PM +1200, Michael Hudson-Doyle wrote: > upstream just "fixed" this by disabling the warning, fwiw
This bug was reported in setools but reassigned to swig - I think you must mean "setools" by "upstream" there? I actually addressed this upstream in SWIG back in May (by fixing the generated code rather than disabling the warning), but there's not been a release in a while. I'll take a look and see if the fix can be backported to the Debian package. The potential problem is that it was after clean-up of support for older Python versions, and it seems unhelpful in the wider context for the Debian swig package to generate code which supports a narrower range of Python versions than the corresponding upstream SWIG version. Ignoring the warning is reasonable. The code in question does invoke undefined behaviour, but it should be safe in practice with the calling conventions used on Linux. Compiling packages with -Werror seems unwise in general, but I really wouldn't recommend compiling SWIG-generated code in packages with -Werror. We do try upstream to keep the generated code warning-free, but it's common for new compiler versions to result in new warnings, and there are cases where it's hard to avoid the warnings (indeed even after my fix you can still get this warning when keyword argument support is enabled, because the Python C API inherently relies on casting function pointers to a different type of function pointer when METH_KEYWORD is used). Cheers, Olly