From 85a2fb9c56c1942958c09c8aeafd14ddefb6e0c3 Mon Sep 17 00:00:00 2001 From: Jack <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Mon, 4 Mar 2024 00:12:05 +0000 Subject: Address C4100 compiler warnings (unused var) (#648) Adds and uses a macro to avoid the warning --- primedev/dedicated/dedicated.cpp | 5 +++++ primedev/dedicated/dedicatedlogtoclient.cpp | 1 + 2 files changed, 6 insertions(+) (limited to 'primedev/dedicated') diff --git a/primedev/dedicated/dedicated.cpp b/primedev/dedicated/dedicated.cpp index 5c679b76..eca9b9f1 100644 --- a/primedev/dedicated/dedicated.cpp +++ b/primedev/dedicated/dedicated.cpp @@ -35,11 +35,14 @@ struct CDedicatedExports void Sys_Printf(CDedicatedExports* dedicated, const char* msg) { + NOTE_UNUSED(dedicated); spdlog::info("[DEDICATED SERVER] {}", msg); } void RunServer(CDedicatedExports* dedicated) { + NOTE_UNUSED(dedicated); + spdlog::info("CDedicatedExports::RunServer(): starting"); spdlog::info(CommandLine()->GetCmdLine()); @@ -86,6 +89,8 @@ class DedicatedConsoleServerPresence : public ServerPresenceReporter HANDLE consoleInputThreadHandle = NULL; DWORD WINAPI ConsoleInputThread(PVOID pThreadParameter) { + NOTE_UNUSED(pThreadParameter); + while (!g_pEngine || !g_pHostState || g_pHostState->m_iCurrentState != HostState_t::HS_RUN) Sleep(1000); diff --git a/primedev/dedicated/dedicatedlogtoclient.cpp b/primedev/dedicated/dedicatedlogtoclient.cpp index bf2cf77a..48954d34 100644 --- a/primedev/dedicated/dedicatedlogtoclient.cpp +++ b/primedev/dedicated/dedicatedlogtoclient.cpp @@ -37,6 +37,7 @@ void DedicatedServerLogToClientSink::custom_sink_it_(const custom_log_msg& msg) void DedicatedServerLogToClientSink::sink_it_(const spdlog::details::log_msg& msg) { + NOTE_UNUSED(msg); throw std::runtime_error("sink_it_ called on DedicatedServerLogToClientSink with pure log_msg. This is an error!"); } -- cgit v1.2.3