From 4f9d999a97d96f3f2a561d56160743c04e551906 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Jul 2018 10:23:51 +0200 Subject: 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 --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b3430dac4..edef1455c 100644 --- a/configure.ac +++ b/configure.ac @@ -139,6 +139,10 @@ AC_SUBST([WARN_CFLAGS]) UL_WARN_ADD([-Wno-clobbered], [BSD_WARN_CFLAGS]) AC_SUBST([BSD_WARN_CFLAGS]) + +UL_WARN_ADD([-Wno-cast-function-type], [PYTHON_WARN_CFLAGS]) +AC_SUBST([PYTHON_WARN_CFLAGS]) + UL_WARN_ADD([-Wno-unused-parameter], [NO_UNUSED_WARN_CFLAGS]) AC_SUBST([NO_UNUSED_WARN_CFLAGS]) -- cgit v1.2.3-55-g7522