Ignore unused benchmark state variables

Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
Chris Burel
2022-02-14 16:13:37 -08:00
parent 92cd457c25
commit 377da0ed0c
3 changed files with 5 additions and 5 deletions
@@ -78,7 +78,7 @@ namespace AZ::Dom::Benchmark
if (apply)
{
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto patchResult = patchInfo.m_forwardPatches.Apply(m_before);
benchmark::DoNotOptimize(patchResult);
@@ -86,7 +86,7 @@ namespace AZ::Dom::Benchmark
}
else
{
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
benchmark::DoNotOptimize(patchInfo);
@@ -104,7 +104,7 @@ namespace AZ::Dom::Benchmark
PathEntry endOfArray;
endOfArray.SetEndOfArray();
for (auto _ : state)
for ([[maybe_unused]] auto _ : state)
{
benchmark::DoNotOptimize(name == name);
benchmark::DoNotOptimize(name == index);