Fix GCC 12 compilation errors

Squelch false positives reported by GCC 12 with UBSan.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #14150
This commit is contained in:
szubersk
2022-11-30 20:27:28 +10:00
committed by Tony Hutter
parent 85c6fd4058
commit 00a3821020
8 changed files with 125 additions and 3 deletions
+2 -1
View File
@@ -171,7 +171,8 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
/*
* Silence infinite recursion warning which was added to -Wall in gcc 12.1
*/
#if defined(HAVE_INFINITE_RECURSION)
#if defined(__GNUC__) && !defined(__clang__) && \
defined(HAVE_KERNEL_INFINITE_RECURSION)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winfinite-recursion"
#endif