Skip to content

Fix PyVTKAddFile_* function signature mismatch

The implementation generated in vtkWrapPython.c has void return type, as noted by GCC when using LTO, e.g.:

./build/CMakeFiles/vtkRenderingOpenGL2PythonPython/vtkRenderingOpenGL2PythonInitImpl.cxx:85:24: warning: 'PyVTKAddFile_vtkPointFillPass' violates the C++ One Definition Rule [-Wodr]
    85 | extern "C" { PyObject *PyVTKAddFile_vtkPointFillPass(PyObject *dict); }
       |                        ^
./build/CMakeFiles/vtkRenderingOpenGL2Python/vtkPointFillPassPython.cxx:442:6: note: return value type mismatch
   442 | void PyVTKAddFile_vtkPointFillPass(
       |      ^
./build/CMakeFiles/vtkRenderingOpenGL2Python/vtkPointFillPassPython.cxx:442:6: note: 'PyVTKAddFile_vtkPointFillPass' was previously declared here
Edited by StefanBruens

Merge request reports