]> git.ipfire.org Git - thirdparty/util-linux.git/commit
build-sys: add -Wno-cast-function-type for python
authorKarel Zak <kzak@redhat.com>
Wed, 18 Jul 2018 08:23:51 +0000 (10:23 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Jul 2018 08:23:51 +0000 (10:23 +0200)
commit4f9d999a97d96f3f2a561d56160743c04e551906
treef1ee2462039b2bae737f825e9c16f3c81984933a
parentb9144a43c03d8ed961c889d9bd113838ac8643ea
build-sys: add -Wno-cast-function-type for python

 libmount/python/pylibmount.c:158:19: warning: cast between incompatible function types
   from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’}
     to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’}
   [-Wcast-function-type]

This is generic problem in all Python C code and gcc v8. The another
possible (and probably more correct) way is to add unused argument to
all API functions. Unfortunately, this solution is pretty invasive. The
question is if gcc is not too paranoid in this case.

For more details see https://bugs.python.org/issue33012. It seems
Python guys also prefer CFLAGS modification for now.

Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
libmount/python/Makemodule.am