diff --git a/src/module.c b/src/module.c index 9e73b21982..20f28223df 100644 --- a/src/module.c +++ b/src/module.c @@ -13059,7 +13059,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.", @@ -13110,11 +13110,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"); }