1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

Tests: Fix new GCC 12 warnings

This commit is contained in:
Daniel Bertalan 2022-05-07 17:49:44 +02:00 committed by Andreas Kling
parent cccc001ded
commit 699bd9afc6
3 changed files with 10 additions and 9 deletions

View file

@ -22,17 +22,13 @@ static void signal_handler(int)
_exit(0);
}
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Winfinite-recursion"
#endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winfinite-recursion"
static size_t infinite_recursion(size_t input)
{
return infinite_recursion(input) + 1;
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
#pragma GCC diagnostic pop
// This test can only pass with sigaltstack correctly enabled, as otherwise the SIGSEGV signal handler itself would also fault due to the overflown stack.
TEST_CASE(success_case)