os: silence warning building with gcc 12 on windows

This commit is contained in:
Michael Scire 2022-06-12 01:38:04 -07:00
parent d75f9bbedf
commit efa4a346af

View file

@ -27,7 +27,10 @@ namespace ams::os::impl {
AMS_ASSERT(out_size != nullptr); AMS_ASSERT(out_size != nullptr);
/* Get the current stack by NT_TIB */ /* Get the current stack by NT_TIB */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
auto *tib = reinterpret_cast<NT_TIB *>(::NtCurrentTeb()); auto *tib = reinterpret_cast<NT_TIB *>(::NtCurrentTeb());
#pragma GCC diagnostic pop
*out_stack = reinterpret_cast<uintptr_t>(tib->StackLimit); *out_stack = reinterpret_cast<uintptr_t>(tib->StackLimit);
*out_size = reinterpret_cast<uintptr_t>(tib->StackBase) - reinterpret_cast<uintptr_t>(tib->StackLimit); *out_size = reinterpret_cast<uintptr_t>(tib->StackBase) - reinterpret_cast<uintptr_t>(tib->StackLimit);