mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-21 11:02:45 +02:00
os: silence warning building with gcc 12 on windows
This commit is contained in:
parent
0ae75a5fd4
commit
d421817c86
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user