From 878b4a71aa9c97ef247feccf9c4ea818d33d62d6 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 1 Feb 2021 19:49:18 +0100 Subject: [PATCH] s3:libsmb: Use C99 initializer for py_cli_notify_state_methods error: missing field 'ml_meth' initializer [-Werror,-Wmissing-field-initializers] { NULL } ^ Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- source3/libsmb/pylibsmb.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 510dd3185d8..45abbec14d2 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -1344,18 +1344,22 @@ static PyObject *py_cli_notify_get_changes(struct py_cli_notify_state *self, } static PyMethodDef py_cli_notify_state_methods[] = { - { "get_changes", - (PyCFunction)py_cli_notify_get_changes, - METH_VARARGS|METH_KEYWORDS, - "Wait for change notifications: \n" - "N.get_changes(wait=BOOLEAN) -> " - "change notifications as a dictionary\n" - "\t\tList contents of a directory. The keys are, \n" - "\t\t\tname: name of changed object\n" - "\t\t\taction: type of the change\n" - "None is returned if there's no response jet and wait=False is passed" + { + .ml_name = "get_changes", + .ml_meth = (PyCFunction)py_cli_notify_get_changes, + .ml_flags = METH_VARARGS|METH_KEYWORDS, + .ml_doc = "Wait for change notifications: \n" + "N.get_changes(wait=BOOLEAN) -> " + "change notifications as a dictionary\n" + "\t\tList contents of a directory. The keys are, \n" + "\t\t\tname: name of changed object\n" + "\t\t\taction: type of the change\n" + "None is returned if there's no response jet and " + "wait=False is passed" }, - { NULL } + { + .ml_name = NULL + } }; static PyTypeObject py_cli_notify_state_type = { -- 2.47.3