From: Willy Tarreau Date: Wed, 14 Jul 2021 17:41:25 +0000 (+0200) Subject: BUILD: lua: silence a build warning with TCC X-Git-Tag: v2.5-dev2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a510907807b7fb901654b4f5e5100aa91868fb7;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/hlua.c b/src/hlua.c index 2ad3d19bd1..f7100465ba 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