summaryrefslogtreecommitdiff
path: root/source4/dns_server
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2019-05-02 19:45:14 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-05-16 17:55:17 +0000
commita7d75a1c57befee4a178b7061ea218e353a72195 (patch)
tree45d349384f33d4ec8c624fd3d40daf4535d4a03f /source4/dns_server
parentcea41645fb463b026bb7161b524ba732ba0d14e3 (diff)
downloadsamba-a7d75a1c57befee4a178b7061ea218e353a72195.tar.gz
s4: 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 + ensure PyCFunctions of type METH_KEYWORDS really actually use the problematic kargs param, if not remove it Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/dns_server')
-rw-r--r--source4/dns_server/pydns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/dns_server/pydns.c b/source4/dns_server/pydns.c
index 16d22dfe4b8..8139ce413e6 100644
--- a/source4/dns_server/pydns.c
+++ b/source4/dns_server/pydns.c
@@ -22,6 +22,7 @@
#include <Python.h>
#include "python/py3compat.h"
#include "includes.h"
+#include "python/modules.h"
#include <pyldb.h>
#include <pytalloc.h>
#include "dns_server/dnsserver_common.h"
@@ -326,7 +327,7 @@ static PyObject *py_dsdb_dns_replace_by_dn(PyObject *self, PyObject *args)
static PyMethodDef py_dsdb_dns_methods[] = {
- { "lookup", (PyCFunction)py_dsdb_dns_lookup,
+ { "lookup", PY_DISCARD_FUNC_SIG(PyCFunction, py_dsdb_dns_lookup),
METH_VARARGS|METH_KEYWORDS,
"Get the DNS database entries for a DNS name"},
{ "replace", (PyCFunction)py_dsdb_dns_replace,