Skip to content

Commit f151581

Browse files
committed
1.6: Fix warnings in crash handler
1 parent 9a1a6bd commit f151581

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Client/core/CCrashDumpWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ namespace
119119
static std::atomic_flag configured = ATOMIC_FLAG_INIT;
120120
if (!configured.test_and_set(std::memory_order_acq_rel))
121121
{
122-
SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_FAIL_CRITICAL_ERRORS);
122+
[[maybe_unused]] const auto previousOptions = SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_FAIL_CRITICAL_ERRORS);
123123
}
124124
}
125125
} // namespace

Client/core/CExceptionInformation_Impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class SymbolHandlerGuard
200200
if (!symbolGuard.IsInitialized())
201201
return std::nullopt;
202202

203-
SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_FAIL_CRITICAL_ERRORS);
203+
[[maybe_unused]] const auto previousOptions = SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_FAIL_CRITICAL_ERRORS);
204204
alignas(SYMBOL_INFO) std::uint8_t symbolBuffer[sizeof(SYMBOL_INFO) + MAX_SYMBOL_NAME];
205205
memset(symbolBuffer, 0, sizeof(symbolBuffer));
206206
PSYMBOL_INFO pSymbol = reinterpret_cast<PSYMBOL_INFO>(symbolBuffer);

Client/core/CrashHandler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,8 +1154,8 @@ static void InstallAbortHandlers()
11541154

11551155
bool disableSehDetourBool{false};
11561156
bool forceSehDetourBool{false};
1157-
TryReadEnvBool("MTA_DISABLE_SEH_DETOUR", disableSehDetourBool);
1158-
TryReadEnvBool("MTA_FORCE_SEH_DETOUR", forceSehDetourBool);
1157+
[[maybe_unused]] const auto readDisableResult = TryReadEnvBool("MTA_DISABLE_SEH_DETOUR", disableSehDetourBool);
1158+
[[maybe_unused]] const auto readForceResult = TryReadEnvBool("MTA_FORCE_SEH_DETOUR", forceSehDetourBool);
11591159

11601160
pConfig->disableSehDetour = disableSehDetourBool ? TRUE : FALSE;
11611161
pConfig->forceSehDetour = forceSehDetourBool ? TRUE : FALSE;
@@ -1352,7 +1352,7 @@ static bool SafeSymGetLineFromAddr64(HANDLE hProcess, DWORD64 address, DWORD* pD
13521352
{
13531353
initialized = true;
13541354
constexpr auto symOptions = SYMOPT_LOAD_LINES | SYMOPT_UNDNAME | SYMOPT_FAIL_CRITICAL_ERRORS;
1355-
SymSetOptions(symOptions);
1355+
[[maybe_unused]] const auto previousOptions = SymSetOptions(symOptions);
13561356
}
13571357
}
13581358

0 commit comments

Comments
 (0)