Ignore -Wcast-function-type warning
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 30 Oct 2019 19:20:20 +0000 (15:20 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 5 Nov 2019 14:26:55 +0000 (09:26 -0500)
commitc29c23a02748cbf801af5cf9286266c435f0d329
tree9cfddafab709170ab31c76ee9878b890f7ddb41a
parent06dc73f7cae98d4294cd127988d917cf148b35d6
Ignore -Wcast-function-type warning

We get this when building on CentOS 8:

bt2/native_bt.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"},
                       ^
bt2/native_bt.c:1820: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 *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"acquires ownership of the pointer"},
                       ^
bt2/native_bt.c:1823: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 *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
                       ^
bt2/native_bt.c:1824:23: error: cast between incompatible function types from ‘PyObject * (*)(SwigPyObject *)’ {aka ‘struct _object * (*)(struct <anonymous> *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Werror=cast-function-type]
   {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
                       ^

See comment in configure.ac for detailed explanation.  It would have
been nice to just disable it when building native_bt.c, but I am not
sure how to do that in a way that's compatible with all compilers and
that is not overly complicated.  So let's just disable it globally for
now.

Change-Id: Iae5c5b6d96978f00e8b19098a438c60817226393
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2309
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
configure.ac
This page took 0.025365 seconds and 4 git commands to generate.