Skip to content

Commit 46cdd9d

Browse files
committed
Fix warnings in crash handler
1 parent 1eaaec4 commit 46cdd9d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Client/core/CCrashDumpWriter.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,11 @@ long WINAPI CCrashDumpWriter::HandleExceptionGlobal(_EXCEPTION_POINTERS* pExcept
13161316
return EXCEPTION_CONTINUE_SEARCH;
13171317
}
13181318

1319-
LogExceptionDetails(pException);
1319+
const BOOL exceptionLogged = LogExceptionDetails(pException);
1320+
if (exceptionLogged == FALSE)
1321+
{
1322+
SAFE_DEBUG_OUTPUT("CCrashDumpWriter: WARNING - LogExceptionDetails failed\n");
1323+
}
13201324

13211325
SAFE_DEBUG_OUTPUT("CCrashDumpWriter: ======================================\n");
13221326
SAFE_DEBUG_OUTPUT("CCrashDumpWriter: FATAL EXCEPTION - Begin crash processing\n");

Client/core/CrashHandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ namespace CrashHandler
13451345
"CrashHandler: InitializeSymbolHandler - WARNING: SymRefreshModuleList failed\n");
13461346
}
13471347

1348-
RegisterProcessModulesWithDbgHelp(hProcess);
1348+
[[maybe_unused]] const bool modulesRegistered = RegisterProcessModulesWithDbgHelp(hProcess);
13491349

13501350
auto moduleCount = DWORD{0};
13511351
auto symbolsLoadedCount = DWORD{0};
@@ -1940,7 +1940,7 @@ static bool SafeSymGetLineFromAddr64(HANDLE hProcess, DWORD64 address, DWORD* pD
19401940
"CaptureUnifiedStackTrace - SymRefreshModuleList succeeded before stack walk\n");
19411941
}
19421942

1943-
RegisterProcessModulesWithDbgHelp(symHandle);
1943+
[[maybe_unused]] const bool modulesRegistered = RegisterProcessModulesWithDbgHelp(symHandle);
19441944
}
19451945

19461946
const auto routines = StackTraceHelpers::MakeStackWalkRoutines(useDbgHelp);

0 commit comments

Comments
 (0)