BUILD: vars: use __fallthrough in var_accounting_{diff,add}()
This avoids 6 build warnings when preprocessing happens before compiling
with gcc >= 7.
diff --git a/src/vars.c b/src/vars.c
index e620acf..0b6bc12 100644
--- a/src/vars.c
+++ b/src/vars.c
@@ -90,7 +90,7 @@
case SCOPE_RES:
if (var_reqres_limit && strm)
_HA_ATOMIC_ADD(&strm->vars_reqres.size, size);
- /* fall through */
+ __fallthrough;
case SCOPE_TXN:
if (var_txn_limit && strm)
_HA_ATOMIC_ADD(&strm->vars_txn.size, size);
@@ -102,12 +102,12 @@
if (check)
_HA_ATOMIC_ADD(&check->vars.size, size);
}
- /* fall through */
scope_sess:
+ __fallthrough;
case SCOPE_SESS:
if (var_sess_limit)
_HA_ATOMIC_ADD(&sess->vars.size, size);
- /* fall through */
+ __fallthrough;
case SCOPE_PROC:
if (var_proc_limit || var_global_limit)
_HA_ATOMIC_ADD(&proc_vars.size, size);
@@ -128,7 +128,7 @@
case SCOPE_RES:
if (var_reqres_limit && strm && strm->vars_reqres.size + size > var_reqres_limit)
return 0;
- /* fall through */
+ __fallthrough;
case SCOPE_TXN:
if (var_txn_limit && strm && strm->vars_txn.size + size > var_txn_limit)
return 0;
@@ -139,12 +139,12 @@
if (var_check_limit && check && check->vars.size + size > var_check_limit)
return 0;
}
- /* fall through */
scope_sess:
+ __fallthrough;
case SCOPE_SESS:
if (var_sess_limit && sess->vars.size + size > var_sess_limit)
return 0;
- /* fall through */
+ __fallthrough;
case SCOPE_PROC:
/* note: scope proc collects all others and is currently identical to the
* global limit.