summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2019-07-23 11:14:14 +0100
committerSimon McVittie <smcv@collabora.com>2019-07-23 11:14:14 +0100
commitb24fd92dcaac567568641df0490acac334dd94c9 (patch)
treecc4752787f25e0055c98c041a69d228fd2f6f0cf /test
parentd59f67d69256fdb88421934297ae20ff49356fb6 (diff)
Silence -Wcast-function-type with gcc 8
Casting via void (*)(void) is the documented way to suppress this warning. This is required because the CPython API treats function pointers as generic, with flags to indicate different calling conventions. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test')
-rw-r--r--test/dbus_py_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dbus_py_test.c b/test/dbus_py_test.c
index f44b2ff..7f8f996 100644
--- a/test/dbus_py_test.c
+++ b/test/dbus_py_test.c
@@ -114,7 +114,7 @@ UnusableMainLoop (PyObject *always_null UNUSED, PyObject *args, PyObject *kwargs
}
static PyMethodDef module_functions[] = {
- {"UnusableMainLoop", (PyCFunction)UnusableMainLoop,
+ {"UnusableMainLoop", (PyCFunction) (void (*)(void))UnusableMainLoop,
METH_VARARGS|METH_KEYWORDS, "Return a main loop that fails to attach"},
{NULL, NULL, 0, NULL}
};