On 9/7/2021 5:52 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
With undocumented structure member initialization an issue, maybe better to
future proof using e.g.
MEM_EXTENDED_PARAMETER mmap_ext = { 0 }; // or memset or bzero
I don't see what this would accomplish. We're already initializing every member
after Corinna's last patch.
Well, if one day MS decides to use some of the Reserved field by splinting off
a new
named field out of that bulk of bits, the code will be in trouble again...
While with memset, bzero or C-style initializer, everything is guaranteed to be
zapped with 0.
MS can't add a new named field to a documented struct without breaking a lot of
code. I think it's extremely unlikely that they would do that. On the other
hand, I think it's very likely that a reader of the Cygwin code would be
confused by code that initializes a struct to 0 prior to assigning a value to
every member.
Ken
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple