From efa4a346af581a39ce148983eb78b5e328e71e2f Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 12 Jun 2022 01:38:04 -0700 Subject: [PATCH] os: silence warning building with gcc 12 on windows --- .../source/os/impl/os_debug_impl.os.windows.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp b/libraries/libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp index 7d25d64a7..b70c8d019 100644 --- a/libraries/libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp +++ b/libraries/libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp @@ -27,7 +27,10 @@ namespace ams::os::impl { AMS_ASSERT(out_size != nullptr); /* Get the current stack by NT_TIB */ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Warray-bounds" auto *tib = reinterpret_cast(::NtCurrentTeb()); + #pragma GCC diagnostic pop *out_stack = reinterpret_cast(tib->StackLimit); *out_size = reinterpret_cast(tib->StackBase) - reinterpret_cast(tib->StackLimit);