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.
(cherry picked from commit
6a510907807b7fb901654b4f5e5100aa91868fb7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit
69c66e3584ac81b70dd445ff56f8c9815de8f28c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
__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; }
#define SET_SAFE_LJMP(__L) \
({ \