From 6a510907807b7fb901654b4f5e5100aa91868fb7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 14 Jul 2021 19:41:25 +0200 Subject: [PATCH] BUILD: lua: silence a build warning with TCC TCC doesn't have the equivalent of __builtin_unreachable() and complains that hlua_panic_ljmp() may return no value. Let's add a return 0 there. All compilers that know that longjmp() doesn't return will see no change and tcc will be happy. --- src/hlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hlua.c b/src/hlua.c index 2ad3d19..f710046 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -124,7 +124,7 @@ __decl_spinlock(hlua_global_lock); THREAD_LOCAL jmp_buf safe_ljmp_env; static int hlua_panic_safe(lua_State *L) { return 0; } -static int hlua_panic_ljmp(lua_State *L) { WILL_LJMP(longjmp(safe_ljmp_env, 1)); } +static int hlua_panic_ljmp(lua_State *L) { WILL_LJMP(longjmp(safe_ljmp_env, 1)); return 0; } /* This is the chained list of struct hlua_function referenced * for haproxy action, sample-fetches, converters, cli and -- 1.7.10.4