From 3bb1f126d21b585b758561cc897e257c0355b121 Mon Sep 17 00:00:00 2001 From: hwware Date: Tue, 17 Sep 2024 18:08:22 +0000 Subject: [PATCH] adjust format and remove test warning Signed-off-by: hwware --- src/module.c | 6 +++--- tests/modules/moduleparameter.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/module.c b/src/module.c index bcd5725f32..8f34474cc8 100644 --- a/src/module.c +++ b/src/module.c @@ -13060,7 +13060,7 @@ void moduleCommand(client *c) { " Load a module library from , passing to it any optional arguments.", "LOADEX [[CONFIG NAME VALUE] [CONFIG NAME VALUE]] [ARGS ...]", " Load a module library from , while passing it module configurations and optional arguments.", - "SET-ARGUMENT [ ...]", + "SET-ARGUMENT [ ...]", " Set module arguments to new values during runtime.", "UNLOAD ", " Unload a module.", @@ -13111,11 +13111,11 @@ void moduleCommand(client *c) { } else if (!strcasecmp(subcmd, "set-argument") && c->argc >= 3) { struct ValkeyModule *module = dictFetchValue(modules, c->argv[2]->ptr); if (module != NULL) { - for (int i = 0; i < module->loadmod->argc; i++) { + for (int i = 0; i < module->loadmod->argc; i++) { decrRefCount(module->loadmod->argv[i]); } zfree(module->loadmod->argv); - robj **argv = NULL; + robj **argv = NULL; int argc = 0; if (c->argc > 3) { diff --git a/tests/modules/moduleparameter.c b/tests/modules/moduleparameter.c index 30678f037a..62d7c0cafc 100644 --- a/tests/modules/moduleparameter.c +++ b/tests/modules/moduleparameter.c @@ -5,6 +5,9 @@ #include int GET_HELLO(ValkeyModuleCtx *ctx, ValkeyModuleString **argv, int argc) { + VALKEYMODULE_NOT_USED(argv); + VALKEYMODULE_NOT_USED(argc); + return ValkeyModule_ReplyWithSimpleString(ctx, "This is update module parameter test module"); }