From e7fdeba668b3653c3f3cffeb87509d895cb53b95 Mon Sep 17 00:00:00 2001 From: Binbin Date: Sun, 22 Dec 2024 22:50:38 +0800 Subject: [PATCH] Fix switch case compilation error in the new helloscripting It is missing the curly braces. Signed-off-by: Binbin --- tests/modules/helloscripting.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/modules/helloscripting.c b/tests/modules/helloscripting.c index fdca6c8e91..c912164bda 100644 --- a/tests/modules/helloscripting.c +++ b/tests/modules/helloscripting.c @@ -213,7 +213,7 @@ static uint32_t executeHelloLangFunction(HelloFunc *func, case CONSTI: stack[sp++] = instr.param.integer; break; - case ARGS: + case ARGS: { uint32_t idx = instr.param.integer; ValkeyModule_Assert(idx < (uint32_t)nargs); size_t len; @@ -221,10 +221,12 @@ static uint32_t executeHelloLangFunction(HelloFunc *func, uint32_t arg = str2int(argStr); stack[sp++] = arg; break; - case RETURN: + } + case RETURN: { uint32_t val = stack[--sp]; ValkeyModule_Assert(sp == 0); return val; + } case FUNCTION: default: ValkeyModule_Assert(0);