diff options
author | Brian Behlendorf <[email protected]> | 2022-06-20 19:53:58 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-06-27 14:18:50 -0700 |
commit | a6e8113fed8a508ffda13cf1c4d8da99a4e8133a (patch) | |
tree | b3a6307a3587fac8a864deb57b4e1c6fb4d08254 /module/lua/ldo.c | |
parent | 80a650b7bb04bce3aef5e4cfd1d966e3599dafd4 (diff) |
Silence -Winfinite-recursion warning in luaD_throw()
This code should be kept inline with the upstream lua version as much
as possible. Therefore, we simply want to silence the warning. This
check was enabled by default as part of -Wall in gcc 12.1.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #13528
Closes #13575
Diffstat (limited to 'module/lua/ldo.c')
-rw-r--r-- | module/lua/ldo.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/module/lua/ldo.c b/module/lua/ldo.c index 727757f7d..1b1f08b47 100644 --- a/module/lua/ldo.c +++ b/module/lua/ldo.c @@ -167,6 +167,13 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) { L->top = oldtop + 1; } +/* + * Silence infinite recursion warning which was added to -Wall in gcc 12.1 + */ +#if defined(HAVE_INFINITE_RECURSION) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Winfinite-recursion"a +#endif l_noret luaD_throw (lua_State *L, int errcode) { if (L->errorJmp) { /* thread has an error handler? */ @@ -189,6 +196,10 @@ l_noret luaD_throw (lua_State *L, int errcode) { } } +#if defined(HAVE_INFINITE_RECURSION) +#pragma GCC diagnostic pop +#endif + int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) { unsigned short oldnCcalls = L->nCcalls; |