]> code.ossystems Code Review - openembedded-core.git/commit
swig: fix gcc8 warnings for cast between incompatible function types
authorYi Zhao <yi.zhao@windriver.com>
Wed, 15 Aug 2018 05:20:36 +0000 (13:20 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 15 Aug 2018 20:45:10 +0000 (21:45 +0100)
commitf0f8ee668de34ad30ca16f5300966a3470018940
treecd86170c529ff051167f0620e3e2660b7ee00f61
parentbdf8ae540af12ecc9ad60efd3651b0f71d12d3bd
swig: fix gcc8 warnings for cast between incompatible function types

We got an error when building setools in meta-selinux:
setools/policyrep/qpol_wrap.c:1819:23:
error: cast between incompatible function types from 'PyObject * (*)(PyObject *)'
{aka 'struct _object * (*)(struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *)'
{aka 'struct _object * (*)(struct _object *, struct _object *)'} [-Werror=cast-function-type]
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},

This is a swig issue. See: https://github.com/swig/swig/issues/1259
Backport a patch from upstream to fix it.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/swig/swig/Python-Fix-new-GCC8-warnings-in-generated-code.patch [new file with mode: 0644]
meta/recipes-devtools/swig/swig_3.0.12.bb