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:
@@ -25,7 +25,7 @@ namespace AZ
|
||||
|
||||
void Matrix3x4SetRowGeneric(Matrix3x4* thisPtr, ScriptDataContext& dc)
|
||||
{
|
||||
bool rowIsSet = false;
|
||||
[[maybe_unused]] bool rowIsSet = false;
|
||||
if (dc.GetNumArguments() >= 5)
|
||||
{
|
||||
if (dc.IsNumber(0))
|
||||
@@ -88,7 +88,7 @@ namespace AZ
|
||||
|
||||
void Matrix3x4SetColumnGeneric(Matrix3x4* thisPtr, ScriptDataContext& dc)
|
||||
{
|
||||
bool columnIsSet = false;
|
||||
[[maybe_unused]] bool columnIsSet = false;
|
||||
if (dc.GetNumArguments() >= 4)
|
||||
{
|
||||
if (dc.IsNumber(0))
|
||||
@@ -133,7 +133,7 @@ namespace AZ
|
||||
|
||||
void Matrix3x4SetTranslationGeneric(Matrix3x4* thisPtr, ScriptDataContext& dc)
|
||||
{
|
||||
bool translationIsSet = false;
|
||||
[[maybe_unused]] bool translationIsSet = false;
|
||||
|
||||
if (dc.GetNumArguments() == 3 &&
|
||||
dc.IsNumber(0) &&
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace AZ
|
||||
|
||||
// check open brace
|
||||
char c = *current++;
|
||||
bool has_open_brace = false;
|
||||
[[maybe_unused]] bool has_open_brace = false;
|
||||
if (c == '{')
|
||||
{
|
||||
c = *current++;
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace AZ
|
||||
|
||||
NameDictionary::~NameDictionary()
|
||||
{
|
||||
bool leaksDetected = false;
|
||||
[[maybe_unused]] bool leaksDetected = false;
|
||||
|
||||
for (const auto& keyValue : m_dictionary)
|
||||
{
|
||||
|
||||
@@ -642,7 +642,7 @@ namespace UnitTest
|
||||
char buffer[RandomStringBufferSize];
|
||||
|
||||
AZStd::sys_time_t newNameTime;
|
||||
AZStd::sys_time_t existingNameTime;
|
||||
[[maybe_unused]] AZStd::sys_time_t existingNameTime;
|
||||
AZStd::sys_time_t stringTime;
|
||||
|
||||
{
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace AzFramework::AssetBenchmark
|
||||
// Console command: Add the given list of assets to the list of assets to load with BenchmarkLoadAssetList
|
||||
void BenchmarkAddAssetsToList(const AZ::ConsoleCommandContainer& parameters)
|
||||
{
|
||||
bool allAssetsAdded = true;
|
||||
[[maybe_unused]] bool allAssetsAdded = true;
|
||||
|
||||
for (auto& assetName : parameters)
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace UnitTest
|
||||
|
||||
TEST_P(Rotation, Permutation)
|
||||
{
|
||||
int expectedErrors = -1;
|
||||
[[maybe_unused]] int expectedErrors = -1;
|
||||
AZ_TEST_START_TRACE_SUPPRESSION;
|
||||
|
||||
// Given an orientation derived from the look at points
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace AzQtComponents
|
||||
QColor color;
|
||||
QString colorName(m_namedVariables.value(name));
|
||||
|
||||
bool colorSet = false;
|
||||
[[maybe_unused]] bool colorSet = false;
|
||||
if (QColor::isValidColor(colorName))
|
||||
{
|
||||
color.setNamedColor(colorName);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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)
|
||||
{
|
||||
|
||||
@@ -1952,8 +1952,8 @@ CarrierThread::ProcessConnections()
|
||||
|
||||
bool isHandshakeTimeOut = false;
|
||||
bool isConnectionTimeout = false;
|
||||
bool isBadTrafficConditions = false;
|
||||
bool isBadPackets = false;
|
||||
[[maybe_unused]] bool isBadTrafficConditions = false;
|
||||
[[maybe_unused]] bool isBadPackets = false;
|
||||
if (connection->m_isBadPackets)
|
||||
{
|
||||
isBadPackets = true;
|
||||
|
||||
Reference in New Issue
Block a user