lib/ldb-samba: squash 'cast between incompatible function types' warning
authorNoel Power <noel.power@suse.com>
Thu, 2 May 2019 18:51:34 +0000 (19:51 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 16 May 2019 17:55:17 +0000 (17:55 +0000)
To avoid warning above produced by using
-Wcast-function-type we;

  + ensure PyCFunctions of type METH_NOARGS defined dummy arg

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/ldb-samba/pyldb.c

index 397e110..b483978 100644 (file)
@@ -156,7 +156,8 @@ static PyObject *py_ldb_set_opaque_integer(PyObject *self, PyObject *args)
        Py_RETURN_NONE;
 }
 
-static PyObject *py_ldb_set_utf8_casefold(PyObject *self)
+static PyObject *py_ldb_set_utf8_casefold(PyObject *self,
+               PyObject *Py_UNUSED(ignored))
 {
        struct ldb_context *ldb;
 
@@ -226,7 +227,8 @@ static PyObject *py_ldb_samba_schema_attribute_add(PyLdbObject *self,
        Py_RETURN_NONE;
 }
 
-static PyObject *py_ldb_register_samba_handlers(PyObject *self)
+static PyObject *py_ldb_register_samba_handlers(PyObject *self,
+               PyObject *Py_UNUSED(ignored))
 {
        struct ldb_context *ldb;
        int ret;