diff options
-rw-r--r-- | winsup/cygwin/miscfuncs.cc | 6 | ||||
-rw-r--r-- | winsup/cygwin/mmap.cc | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index b544e71..024ad70 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -517,9 +517,8 @@ class thread_allocator THREAD_STACK_SLOT }; /* g++ 11.2 workaround: don't use initializer */ - MEM_EXTENDED_PARAMETER thread_ext; + MEM_EXTENDED_PARAMETER thread_ext = { 0 }; thread_ext.Type = MemExtendedParameterAddressRequirements; - thread_ext.Reserved = 0; thread_ext.Pointer = (PVOID) &thread_req; SIZE_T real_size = roundup2 (size, THREAD_STACK_SLOT); @@ -539,9 +538,8 @@ class thread_allocator THREAD_STACK_SLOT }; /* g++ 11.2 workaround: don't use initializer */ - MEM_EXTENDED_PARAMETER mmap_ext; + MEM_EXTENDED_PARAMETER mmap_ext = { 0 }; mmap_ext.Type = MemExtendedParameterAddressRequirements; - mmap_ext.Reserved = 0; mmap_ext.Pointer = (PVOID) &mmap_req; real_stackaddr = VirtualAlloc2 (GetCurrentProcess(), NULL, real_size, diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 2e202a0..7982fd1 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -207,9 +207,8 @@ MapView (HANDLE h, void *addr, size_t len, DWORD openflags, 0 }; /* g++ 11.2 workaround: don't use initializer */ - MEM_EXTENDED_PARAMETER mmap_ext; + MEM_EXTENDED_PARAMETER mmap_ext = { 0 }; mmap_ext.Type = MemExtendedParameterAddressRequirements; - mmap_ext.Reserved = 0; mmap_ext.Pointer = (PVOID) &mmap_req; alloc_type |= attached (prot) ? MEM_RESERVE : 0; @@ -1628,9 +1627,8 @@ fhandler_dev_zero::mmap (caddr_t *addr, size_t len, int prot, 0 }; /* g++ 11.2 workaround: don't use initializer */ - MEM_EXTENDED_PARAMETER mmap_ext; + MEM_EXTENDED_PARAMETER mmap_ext = { 0 }; mmap_ext.Type = MemExtendedParameterAddressRequirements; - mmap_ext.Reserved = 0; mmap_ext.Pointer = (PVOID) &mmap_req; base = VirtualAlloc2 (GetCurrentProcess(), *addr, len, alloc_type, |