Fix unused warnings release (#3677)
* Release build fix for Windows * Release build fix for Android * Release build fix for Windows * Release build fix for Android * Release build fix for Linux * Release build fix for Mac * Release build fix for iOS Signed-off-by: Steve Pham <spham@amazon.com>
This commit is contained in:
@@ -87,7 +87,7 @@ bool CConsoleBatchFile::ExecuteConfigFile(const char* sFilename)
|
||||
CCryFile file;
|
||||
|
||||
{
|
||||
const char* szLog = "Executing console batch file (try game,config,root):";
|
||||
[[maybe_unused]] const char* szLog = "Executing console batch file (try game,config,root):";
|
||||
AZStd::string filenameLog;
|
||||
AZStd::string sfn = PathUtil::GetFile(filename);
|
||||
|
||||
|
||||
@@ -32,8 +32,11 @@
|
||||
#define MAX_CELL_COUNT 32
|
||||
|
||||
// CVAR names
|
||||
#if !defined(_RELEASE)
|
||||
const char c_sys_localization_debug[] = "sys_localization_debug";
|
||||
const char c_sys_localization_encode[] = "sys_localization_encode";
|
||||
#endif // !defined(_RELEASE)
|
||||
|
||||
#define LOC_WINDOW "Localization"
|
||||
const char c_sys_localization_format[] = "sys_localization_format";
|
||||
|
||||
@@ -1754,7 +1757,7 @@ void CLocalizedStringsManager::ReloadData()
|
||||
void CLocalizedStringsManager::AddLocalizedString(SLanguage* pLanguage, SLocalizedStringEntry* pEntry, const uint32 keyCRC32)
|
||||
{
|
||||
pLanguage->m_vLocalizedStrings.push_back(pEntry);
|
||||
int nId = (int)pLanguage->m_vLocalizedStrings.size() - 1;
|
||||
[[maybe_unused]] int nId = (int)pLanguage->m_vLocalizedStrings.size() - 1;
|
||||
pLanguage->m_keysMap[keyCRC32] = pEntry;
|
||||
|
||||
if (m_cvarLocalizationDebug >= 2)
|
||||
|
||||
@@ -744,7 +744,7 @@ void CLog::LogToConsolePlus(const char* szFormat, ...)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
static void RemoveColorCodeInPlace(CLog::LogStringType& rStr)
|
||||
[[maybe_unused]] static void RemoveColorCodeInPlace(CLog::LogStringType& rStr)
|
||||
{
|
||||
char* s = (char*)rStr.c_str();
|
||||
char* d = s;
|
||||
|
||||
@@ -1465,7 +1465,7 @@ void CSystem::SetSystemGlobalState(const ESystemGlobalState systemGlobalState)
|
||||
if (gEnv && gEnv->pTimer)
|
||||
{
|
||||
const CTimeValue endTime = gEnv->pTimer->GetAsyncTime();
|
||||
const float numSeconds = endTime.GetDifferenceInSeconds(s_startTime);
|
||||
[[maybe_unused]] const float numSeconds = endTime.GetDifferenceInSeconds(s_startTime);
|
||||
CryLog("SetGlobalState %d->%d '%s'->'%s' %3.1f seconds",
|
||||
m_systemGlobalState, systemGlobalState,
|
||||
CSystem::GetSystemGlobalStateName(m_systemGlobalState), CSystem::GetSystemGlobalStateName(systemGlobalState),
|
||||
|
||||
@@ -180,7 +180,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()
|
||||
|
||||
@@ -251,7 +251,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__);
|
||||
}
|
||||
|
||||
@@ -257,8 +257,8 @@ static void CmdCrashTest(IConsoleCmdArgs* pArgs)
|
||||
{
|
||||
float a = 1.0f;
|
||||
memset(&a, 0, sizeof(a));
|
||||
float* b = &a;
|
||||
float c = 3;
|
||||
[[maybe_unused]] float* b = &a;
|
||||
[[maybe_unused]] float c = 3;
|
||||
CryLog("%f", (c / *b));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -550,7 +550,7 @@ void CTimer::Serialize(TSerialize ser)
|
||||
|
||||
if (m_TimeDebug)
|
||||
{
|
||||
const int64 now = CryGetTicks();
|
||||
[[maybe_unused]] const int64 now = CryGetTicks();
|
||||
CryLogAlways("[CTimer]: Serialize: Last=%lld Now=%lld Off=%lld Async=%f CurrTime=%f UI=%f", (long long)m_lLastTime, (long long)now, (long long)m_lOffsetTime, GetAsyncCurTime(), GetCurrTime(ETIMER_GAME), GetCurrTime(ETIMER_UI));
|
||||
}
|
||||
}
|
||||
@@ -700,8 +700,8 @@ void CTimer::EnableFixedTimeMode([[maybe_unused]] bool enable, [[maybe_unused]]
|
||||
|
||||
void CTimer::SetOffsetToMatchGameTime(int64 ticks)
|
||||
{
|
||||
const int64 previousOffset = m_lOffsetTime;
|
||||
const float previousGameTime = GetCurrTime(ETIMER_GAME);
|
||||
[[maybe_unused]] const int64 previousOffset = m_lOffsetTime;
|
||||
[[maybe_unused]] const float previousGameTime = GetCurrTime(ETIMER_GAME);
|
||||
|
||||
m_lOffsetTime = ticks - m_lLastTime;
|
||||
RefreshGameTime(m_lLastTime);
|
||||
|
||||
Reference in New Issue
Block a user