diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index e5a42aabbc..cd30b753b5 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -1924,13 +1924,11 @@ namespace AZ::IO ArchiveLocationPriority Archive::GetPakPriority() const { int pakPriority = aznumeric_cast(ArchiveVars{}.nPriority); -#if defined(AZ_ENABLE_TRACING) if (auto console = AZ::Interface::Get(); console != nullptr) { - AZ::GetValueResult getCvarResult = console->GetCvarValue("sys_PakPriority", pakPriority); + [[maybe_unused]] AZ::GetValueResult getCvarResult = console->GetCvarValue("sys_PakPriority", pakPriority); AZ_Error("Archive", getCvarResult == AZ::GetValueResult::Success, "Lookup of 'sys_PakPriority console variable failed with error %s", AZ::GetEnumString(getCvarResult)); } -#endif return static_cast(pakPriority); }