s4: squash 'cast between incompatible function types' warning
[bbaumbach/samba-autobuild/.git] / source4 / lib / registry / pyregistry.c
index 78b47b8286d8e03fe69ed0489ce49a78b1ebd891..5da804fb048de17603665d251ab0edc9b308400b 100644 (file)
@@ -21,6 +21,7 @@
 #include <Python.h>
 #include "python/py3compat.h"
 #include "includes.h"
+#include "python/modules.h"
 #include "libcli/util/pyerrors.h"
 #include "lib/registry/registry.h"
 #include <pytalloc.h>
@@ -178,7 +179,8 @@ static PyObject *py_hive_key_del(PyObject *self, PyObject *args)
        Py_RETURN_NONE; 
 }
 
-static PyObject *py_hive_key_flush(PyObject *self)
+static PyObject *py_hive_key_flush(PyObject *self,
+               PyObject *Py_UNUSED(ignored))
 {
        WERROR result;
        struct hive_key *key = PyHiveKey_AsHiveKey(self);
@@ -433,9 +435,12 @@ static PyObject *py_get_predef_name(PyObject *self, PyObject *args)
 }
 
 static PyMethodDef py_registry_methods[] = {
-       { "open_samba", (PyCFunction)py_open_samba, METH_VARARGS|METH_KEYWORDS, "open_samba() -> reg" },
-       { "open_ldb", (PyCFunction)py_open_ldb_file, METH_VARARGS|METH_KEYWORDS, "open_ldb(location, session_info=None, credentials=None, loadparm_context=None) -> key" },
-       { "open_hive", (PyCFunction)py_open_hive, METH_VARARGS|METH_KEYWORDS, "open_hive(location, session_info=None, credentials=None, loadparm_context=None) -> key" },
+       { "open_samba", PY_DISCARD_FUNC_SIG(PyCFunction, py_open_samba),
+               METH_VARARGS|METH_KEYWORDS, "open_samba() -> reg" },
+       { "open_ldb", PY_DISCARD_FUNC_SIG(PyCFunction, py_open_ldb_file),
+               METH_VARARGS|METH_KEYWORDS, "open_ldb(location, session_info=None, credentials=None, loadparm_context=None) -> key" },
+       { "open_hive", PY_DISCARD_FUNC_SIG(PyCFunction, py_open_hive),
+               METH_VARARGS|METH_KEYWORDS, "open_hive(location, session_info=None, credentials=None, loadparm_context=None) -> key" },
        { "str_regtype", py_str_regtype, METH_VARARGS, "str_regtype(int) -> str" },
        { "get_predef_name", py_get_predef_name, METH_VARARGS, "get_predef_name(hkey) -> str" },
        { NULL }