LYN-6882 release builds are executing code in asserts (#4305)
* adding Windows/release to PR-validation builds Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * changing trace back to expand to nothing for release Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * typo Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * more fixes Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * fixing some more unused variable cases Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * renaming file in ScriptCanvas that causes a msbuild warning Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * reverting a previous change Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -262,17 +262,17 @@ namespace AZ
|
||||
|
||||
#else // !AZ_ENABLE_TRACING
|
||||
|
||||
#define AZ_Assert(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_Error(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_ErrorOnce(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_Warning(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_WarningOnce(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_TracePrintf(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_TracePrintfOnce(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_Assert(...)
|
||||
#define AZ_Error(...)
|
||||
#define AZ_ErrorOnce(...)
|
||||
#define AZ_Warning(...)
|
||||
#define AZ_WarningOnce(...)
|
||||
#define AZ_TracePrintf(...)
|
||||
#define AZ_TracePrintfOnce(...)
|
||||
|
||||
#define AZ_Verify(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_VerifyError(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_VerifyWarning(...) AZ_UNUSED(__VA_ARGS__);
|
||||
#define AZ_Verify(expression, ...) AZ_UNUSED(expression)
|
||||
#define AZ_VerifyError(window, expression, ...) AZ_UNUSED(expression)
|
||||
#define AZ_VerifyWarning(window, expression, ...) AZ_UNUSED(expression)
|
||||
|
||||
#endif // AZ_ENABLE_TRACING
|
||||
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@ namespace AzToolsFramework
|
||||
absoluteIconPath = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / TreeIconPathOneChild;
|
||||
break;
|
||||
}
|
||||
bool pixmapLoadedSuccess = pixmap.load(absoluteIconPath.c_str());
|
||||
[[maybe_unused]] bool pixmapLoadedSuccess = pixmap.load(absoluteIconPath.c_str());
|
||||
AZ_Assert(pixmapLoadedSuccess, "Error loading Branch Icons in SearchEntryDelegate");
|
||||
|
||||
m_branchIcons[static_cast<EntryBranchType>(branchType)] = pixmap;
|
||||
|
||||
@@ -579,10 +579,13 @@ namespace AzToolsFramework
|
||||
|
||||
Template& targetTemplate = targetTemplateReference->get();
|
||||
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
Template& sourceTemplate = sourceTemplateReference->get();
|
||||
AZStd::string_view instanceName(instanceIterator->name.GetString(), instanceIterator->name.GetStringLength());
|
||||
|
||||
const AZStd::string& targetTemplateFilePath = targetTemplate.GetFilePath().Native();
|
||||
const AZStd::string& sourceTemplateFilePath = sourceTemplate.GetFilePath().Native();
|
||||
#endif
|
||||
|
||||
LinkId newLinkId = CreateUniqueLinkId();
|
||||
Link newLink(newLinkId);
|
||||
@@ -911,8 +914,10 @@ namespace AzToolsFramework
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
Template& sourceTemplate = sourceTemplateReference->get();
|
||||
Template& targetTemplate = targetTemplateReference->get();
|
||||
#endif
|
||||
|
||||
AZStd::string_view instanceName(instanceIterator->name.GetString(), instanceIterator->name.GetStringLength());
|
||||
|
||||
|
||||
+1
-1
@@ -1160,7 +1160,7 @@ namespace AzToolsFramework
|
||||
AZStd::string unsavedPrefabFileName = unsavedPrefabFileLabel->property("FilePath").toString().toUtf8().data();
|
||||
AzToolsFramework::Prefab::TemplateId unsavedPrefabTemplateId =
|
||||
s_prefabSystemComponentInterface->GetTemplateIdFromFilePath(unsavedPrefabFileName.data());
|
||||
bool isTemplateSavedSuccessfully = s_prefabLoaderInterface->SaveTemplate(unsavedPrefabTemplateId);
|
||||
[[maybe_unused]] bool isTemplateSavedSuccessfully = s_prefabLoaderInterface->SaveTemplate(unsavedPrefabTemplateId);
|
||||
AZ_Error("Prefab", isTemplateSavedSuccessfully, "Prefab '%s' could not be saved successfully.", unsavedPrefabFileName.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -627,8 +627,10 @@ namespace O3DELauncher
|
||||
AZ_TracePrintf("Launcher", "Application is configured for VFS");
|
||||
AZ_TracePrintf("Launcher", "Log and cache files will be written to the Cache directory on your host PC");
|
||||
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
constexpr const char* message = "If your game does not run, check any of the following:\n"
|
||||
"\t- Verify the remote_ip address is correct in bootstrap.cfg";
|
||||
#endif
|
||||
if (mainInfo.m_additionalVfsResolution)
|
||||
{
|
||||
AZ_TracePrintf("Launcher", "%s\n%s", message, mainInfo.m_additionalVfsResolution)
|
||||
|
||||
@@ -164,7 +164,10 @@ namespace AssetUtilsInternal
|
||||
|
||||
AZ::SettingsRegistryMergeUtils::DumperSettings apDumperSettings;
|
||||
apDumperSettings.m_prettifyOutput = true;
|
||||
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
|
||||
// capture. Newer versions issue unused warning
|
||||
apDumperSettings.m_includeFilter = [&AssetProcessorUserSettingsRootKey](AZStd::string_view path)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
// The AssetUtils only updates the following keys in the registry
|
||||
// Dump them all out to the setreg file
|
||||
|
||||
+6
-2
@@ -64,9 +64,11 @@ namespace TestImpact
|
||||
return !name.starts_with("DISABLED_") && name.find("/DISABLED_") == AZStd::string::npos;
|
||||
};
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr
|
||||
// in the capture. Newer versions issue unused warning
|
||||
const auto getDuration = [Keys](const AZ::rapidxml::xml_node<>* node)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
AZ_UNUSED(Keys);
|
||||
const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value();
|
||||
return AZStd::chrono::milliseconds(static_cast<AZStd::sys_time_t>(AZStd::stof(duration) * 1000.f));
|
||||
};
|
||||
@@ -79,9 +81,11 @@ namespace TestImpact
|
||||
for (auto testcase_node = testsuite_node->first_node(Keys[TestCaseKey]); testcase_node;
|
||||
testcase_node = testcase_node->next_sibling())
|
||||
{
|
||||
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the capture.
|
||||
// Newer versions issue unused warning
|
||||
const auto getStatus = [Keys](const AZ::rapidxml::xml_node<>* node)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
AZ_UNUSED(Keys);
|
||||
const AZStd::string status = node->first_attribute(Keys[StatusKey])->value();
|
||||
if (status == Keys[RunKey])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user