From 8941c9d227a20f4dc14b7ac00bf936f177010fcf Mon Sep 17 00:00:00 2001 From: bosnichd Date: Wed, 8 Sep 2021 13:21:15 -0600 Subject: [PATCH] Add [[maybe_unused]] to some local variables that are only referenced as arguments to CryLogAlways that is not compiled in release. (#3992) Signed-off-by: bosnichd --- Code/Legacy/CrySystem/SystemCFG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Legacy/CrySystem/SystemCFG.cpp b/Code/Legacy/CrySystem/SystemCFG.cpp index 52e377db7f..802e577386 100644 --- a/Code/Legacy/CrySystem/SystemCFG.cpp +++ b/Code/Legacy/CrySystem/SystemCFG.cpp @@ -178,7 +178,7 @@ void CSystem::LogVersion() strftime(s, 128, "%d %b %y (%H %M %S)", today); #endif - const SFileVersion& ver = GetFileVersion(); + [[maybe_unused]] const SFileVersion& ver = GetFileVersion(); CryLogAlways("BackupNameAttachment=\" Build(%d) %s\" -- used by backup system\n", ver.v[0], s); // read by CreateBackupFile() @@ -249,7 +249,7 @@ void CSystem::LogVersion() ////////////////////////////////////////////////////////////////////////// void CSystem::LogBuildInfo() { - auto projectName = AZ::Utils::GetProjectName(); + [[maybe_unused]] auto projectName = AZ::Utils::GetProjectName(); CryLogAlways("GameName: %s", projectName.c_str()); CryLogAlways("BuildTime: " __DATE__ " " __TIME__); }