From d421817c8666e4abb4e3e4216ed16473d1142c0f 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 --- libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp b/libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp index 7d25d64a..b70c8d01 100644 --- a/libstratosphere/source/os/impl/os_debug_impl.os.windows.hpp +++ b/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);