@@ -545,7 +545,8 @@ static void AppendCrashDiagnostics(const SString& text)
545545 constexpr DWORD kSymbolNameCapacity = MAX_SYM_NAME - 1 ;
546546 alignas (SYMBOL_INFO) unsigned char symbolBuffer[sizeof (SYMBOL_INFO) + MAX_SYM_NAME] = {};
547547 PSYMBOL_INFO pSymbol = reinterpret_cast <PSYMBOL_INFO>(symbolBuffer);
548- *pSymbol = SYMBOL_INFO{.SizeOfStruct = sizeof (SYMBOL_INFO), .MaxNameLen = kSymbolNameCapacity };
548+ pSymbol->SizeOfStruct = sizeof (SYMBOL_INFO);
549+ pSymbol->MaxNameLen = kSymbolNameCapacity ;
549550
550551 std::array<DWORD64, MAX_FALLBACK_STACK_FRAMES> visitedAddresses{};
551552 std::size_t visitedCount = 0 ;
@@ -579,7 +580,8 @@ static void AppendCrashDiagnostics(const SString& text)
579580 symbolName = pSymbol->Name ;
580581 }
581582
582- IMAGEHLP_LINE64 lineInfo{.SizeOfStruct = sizeof (IMAGEHLP_LINE64)};
583+ IMAGEHLP_LINE64 lineInfo{};
584+ lineInfo.SizeOfStruct = sizeof (IMAGEHLP_LINE64);
583585 DWORD lineDisplacement = 0 ;
584586 SString lineDetail = " unknown" ;
585587 if (SymGetLineFromAddr64 (hProcess, address, &lineDisplacement, &lineInfo) != FALSE )
@@ -651,8 +653,7 @@ void CCrashDumpWriter::LogEvent(const char* szType, const char* szContext, const
651653 SLogEventLine line;
652654 while (ms_LogEventFilter.PopOutputLine (line))
653655 {
654- ms_LogEventList.emplace_front (
655- SLogEventInfo{.uiTickCount = GetTickCount32 (), .strType = line.strType , .strContext = line.strContext , .strBody = line.strBody });
656+ ms_LogEventList.emplace_front (SLogEventInfo{GetTickCount32 (), line.strType , line.strContext , line.strBody });
656657
657658 while (ms_LogEventList.size () > LOG_EVENT_SIZE)
658659 ms_LogEventList.pop_back ();
@@ -1528,7 +1529,10 @@ void CCrashDumpWriter::DumpMiniDump(_EXCEPTION_POINTERS* pException, CExceptionI
15281529
15291530 if (hFile != INVALID_HANDLE_VALUE)
15301531 {
1531- _MINIDUMP_EXCEPTION_INFORMATION ExInfo{.ThreadId = GetCurrentThreadId (), .ExceptionPointers = pException, .ClientPointers = FALSE };
1532+ _MINIDUMP_EXCEPTION_INFORMATION ExInfo{};
1533+ ExInfo.ThreadId = GetCurrentThreadId ();
1534+ ExInfo.ExceptionPointers = pException;
1535+ ExInfo.ClientPointers = FALSE ;
15321536
15331537 BOOL bResult = pDump (GetCurrentProcess (), GetCurrentProcessId (), hFile,
15341538 static_cast <MINIDUMP_TYPE>(MiniDumpNormal | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, nullptr , nullptr );
@@ -1985,7 +1989,10 @@ void CCrashDumpWriter::DumpMiniDump(_EXCEPTION_POINTERS* pException, CExceptionI
19851989 std::vector<wchar_t > commandBuffer (commandLineWide.length () + 1u , L' \0 ' );
19861990 std::copy (commandLineWide.begin (), commandLineWide.end (), commandBuffer.begin ());
19871991
1988- STARTUPINFOW startupInfo{.cb = sizeof (STARTUPINFOW), .dwFlags = STARTF_USESHOWWINDOW, .wShowWindow = SW_SHOWNORMAL};
1992+ STARTUPINFOW startupInfo{};
1993+ startupInfo.cb = sizeof (startupInfo);
1994+ startupInfo.dwFlags = STARTF_USESHOWWINDOW;
1995+ startupInfo.wShowWindow = SW_SHOWNORMAL;
19891996 PROCESS_INFORMATION processInfo{};
19901997
19911998 constexpr DWORD kProcessCreationFlags = DETACHED_PROCESS | CREATE_BREAKAWAY_FROM_JOB | CREATE_NEW_PROCESS_GROUP;
0 commit comments