
12 Oct
2006
12 Oct
'06
6:43 p.m.
Peter Dimov wrote:
Daniel Schlyder wrote:
BTW, shouldn't the line in mutex.inl that reads
OSVERSIONINFO version_info = {sizeof(OSVERSIONINFO)};
This is an idiomatic way to initialize the first member to sizeof(OSVERSIONINFO) and the rest to zero.
Ah, ok. So GCC shouldn't emit those missing initializer warnings. Would be nice to silence them anyway, though. Maybe using OSVERSIONINFO version_info = {sizeof(OSVERSIONINFO), 0, 0, 0, 0, 0}; ?
be replaced with
OSVERSIONINFO version_info; version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
This initializes dwOSVersionInfoSize to sizeof(OSVERSIONINFO) and leaves the rest uninitialized.
Not a problem if the return value of GetVersionEx() is checked. -- Daniel Schlyder