Clang 13: Fix build errors ...

... due to local variables only being written to (but never read).

Signed-off-by: Daniel Edwards <dev@danieledwards.de>
This commit is contained in:
Daniel Edwards
2022-01-22 14:36:20 +01:00
parent 878ba24a3f
commit 0a5f472f43
42 changed files with 50 additions and 50 deletions
@@ -177,7 +177,7 @@ namespace AzToolsFramework
auto data = index.data(AssetBrowserModel::Roles::EntryRole);
if (data.canConvert<const AssetBrowserEntry*>())
{
bool isEnabled = (option.state & QStyle::State_Enabled) != 0;
[[maybe_unused]] bool isEnabled = (option.state & QStyle::State_Enabled) != 0;
QStyle* style = option.widget ? option.widget->style() : QApplication::style();
@@ -506,7 +506,7 @@ namespace AzToolsFramework
//Remove all Links owned by the Template from TemplateToLinkIdsMap.
Template& templateToDelete = findTemplateResult->get();
const Template::Links& linkIdsToDelete = templateToDelete.GetLinks();
bool result;
[[maybe_unused]] bool result;
for (auto linkId : linkIdsToDelete)
{
result = RemoveLinkIdFromTemplateToLinkIdsMap(linkId);
@@ -774,7 +774,7 @@ namespace AzToolsFramework
}
Link& link = findLinkResult->get();
bool result;
[[maybe_unused]] bool result;
result = RemoveLinkIdFromTemplateToLinkIdsMap(linkId, link);
AZ_Assert(result,
"Prefab - PrefabSystemComponent::RemoveLink - "
@@ -926,7 +926,7 @@ namespace AzToolsFramework
const bool entityIsFromIgnoredSliceInstance = ignoreSliceInstance && ignoreSliceInstance->IsValid() && ignoreSliceInstance->GetReference()->GetSliceAsset().GetId() == instanceAddr.GetReference()->GetSliceAsset().GetId();
if (!entityIsFromIgnoredSliceInstance)
{
bool foundTargetAncestor = false;
[[maybe_unused]] bool foundTargetAncestor = false;
const AZ::SliceComponent::EntityList& entitiesInInstance = instanceAddr.GetInstance()->GetInstantiated()->m_entities;
@@ -45,7 +45,7 @@ namespace AzToolsFramework
void PropertyEnumComboBoxCtrl::setValue(AZ::s64 value)
{
m_pComboBox->blockSignals(true);
bool indexWasFound = false;
[[maybe_unused]] bool indexWasFound = false;
for (size_t enumValIndex = 0; enumValIndex < m_enumValues.size(); enumValIndex++)
{
if (m_enumValues[enumValIndex].first == value)
@@ -430,7 +430,7 @@ namespace UnitTest
size_t nextIndex = 1;
size_t slices = 0;
size_t liveAllocs = 0;
size_t totalAllocs = 0;
[[maybe_unused]] size_t totalAllocs = 0;
auto cb = [&liveAllocs](void*, const AZ::Debug::AllocationInfo&, unsigned char)
{