summaryrefslogtreecommitdiff
path: root/source4/param
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/param
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/param')
-rw-r--r--source4/param/pyparam.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c
index 9801b0cb01a..200162ea29e 100644
--- a/source4/param/pyparam.c
+++ b/source4/param/pyparam.c
@@ -614,33 +614,33 @@ PyTypeObject PyLoadparmService = {
.tp_flags = Py_TPFLAGS_DEFAULT,
};
-static PyObject *py_default_path(PyObject *self)
+static PyObject *py_default_path(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return PyStr_FromString(lp_default_path());
}
-static PyObject *py_setup_dir(PyObject *self)
+static PyObject *py_setup_dir(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return PyStr_FromString(dyn_SETUPDIR);
}
-static PyObject *py_modules_dir(PyObject *self)
+static PyObject *py_modules_dir(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return PyStr_FromString(dyn_MODULESDIR);
}
-static PyObject *py_bin_dir(PyObject *self)
+static PyObject *py_bin_dir(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return PyStr_FromString(dyn_BINDIR);
}
-static PyObject *py_sbin_dir(PyObject *self)
+static PyObject *py_sbin_dir(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return PyStr_FromString(dyn_SBINDIR);
}
static PyMethodDef pyparam_methods[] = {
- { "default_path", (PyCFunction)py_default_path, METH_NOARGS,
+ { "default_path", (PyCFunction)py_default_path, METH_NOARGS,
"Returns the default smb.conf path." },
{ "setup_dir", (PyCFunction)py_setup_dir, METH_NOARGS,
"Returns the compiled in location of provision tempates." },