mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-28 17:21:32 +02:00
BUILD: hlua: use __fallthrough in hlua_post_init_state()
This avoids 5 build warnings when preprocessing happens before compiling with gcc >= 7.
This commit is contained in:
parent
a551f4fbfd
commit
14de395a30
10
src/hlua.c
10
src/hlua.c
@ -8774,7 +8774,7 @@ static int hlua_sample_conv_wrapper(const struct arg *arg_p, struct sample *smp,
|
||||
case HLUA_E_ERR:
|
||||
/* Display log. */
|
||||
SEND_ERR(stream->be, "Lua converter '%s' returns an unknown error.\n", fcn->name);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
@ -8912,7 +8912,7 @@ static int hlua_sample_fetch_wrapper(const struct arg *arg_p, struct sample *smp
|
||||
case HLUA_E_ERR:
|
||||
/* Display log. */
|
||||
SEND_ERR(smp->px, "Lua sample-fetch '%s' returns an unknown error.\n", fcn->name);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
@ -11771,7 +11771,7 @@ int hlua_post_init_state(lua_State *L)
|
||||
|
||||
case LUA_ERRERR:
|
||||
kind = "message handler error";
|
||||
/* Fall through */
|
||||
__fallthrough;
|
||||
case LUA_ERRRUN:
|
||||
if (!kind)
|
||||
kind = "runtime error";
|
||||
@ -11789,12 +11789,12 @@ int hlua_post_init_state(lua_State *L)
|
||||
default:
|
||||
/* Unknown error */
|
||||
kind = "Unknown error";
|
||||
/* Fall through */
|
||||
__fallthrough;
|
||||
case LUA_YIELD:
|
||||
/* yield is not configured at this step, this state doesn't happen */
|
||||
if (!kind)
|
||||
kind = "yield not allowed";
|
||||
/* Fall through */
|
||||
__fallthrough;
|
||||
case LUA_ERRMEM:
|
||||
if (!kind)
|
||||
kind = "out of memory error";
|
||||
|
Loading…
x
Reference in New Issue
Block a user