From cbdd3d0c26c9cefd968a2adaf9892c5c858bf597 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 2 May 2019 19:47:29 +0100 Subject: squash 'cast between incompatible function types' warning To avoid warning above produced by using -Wcast-function-type we; + ensure PyCFunctions of type METH_NOARGS defined dummy arg + ensure PyCFunctions of type METH_KEYWORDS use PY_DISCARD_FUNC_SIG macro Signed-off-by: Noel Power Reviewed-by: Andreas Schneider --- auth/credentials/pycredentials.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'auth') diff --git a/auth/credentials/pycredentials.c b/auth/credentials/pycredentials.c index 1b86e001557..966c625a10e 100644 --- a/auth/credentials/pycredentials.c +++ b/auth/credentials/pycredentials.c @@ -19,6 +19,7 @@ #include #include "python/py3compat.h" #include "includes.h" +#include "python/modules.h" #include "pycredentials.h" #include "param/param.h" #include "lib/cmdline/credentials.h" @@ -760,7 +761,8 @@ static PyMethodDef py_creds_methods[] = { }, { .ml_name = "get_ntlm_response", - .ml_meth = (PyCFunction)py_creds_get_ntlm_response, + .ml_meth = PY_DISCARD_FUNC_SIG(PyCFunction, + py_creds_get_ntlm_response), .ml_flags = METH_VARARGS | METH_KEYWORDS, .ml_doc = "S.get_ntlm_response" "(flags, challenge[, target_info]) -> " -- cgit v1.2.1