summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2019-05-02 19:47:29 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-05-16 17:55:17 +0000
commitcbdd3d0c26c9cefd968a2adaf9892c5c858bf597 (patch)
treece2f3c7d6a024b80f2c5981707371123c6d12c81 /auth
parenta7d75a1c57befee4a178b7061ea218e353a72195 (diff)
downloadsamba-cbdd3d0c26c9cefd968a2adaf9892c5c858bf597.tar.gz
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 <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'auth')
-rw-r--r--auth/credentials/pycredentials.c4
1 files changed, 3 insertions, 1 deletions
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 <Python.h>
#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]) -> "