From 4962c1c56137b32a86215007b04f4ae398cb66ae Mon Sep 17 00:00:00 2001 From: Erik Price <188935+erik@users.noreply.github.com> Date: Tue, 5 Jul 2022 18:27:55 +0200 Subject: [PATCH] Suppress unused-but-set-variable in benchmark/ (#273) --- benchmark/parse/vector_tile.benchmark.cpp | 1 + benchmark/util/tilecover.benchmark.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/benchmark/parse/vector_tile.benchmark.cpp b/benchmark/parse/vector_tile.benchmark.cpp index 24623dbda..b87241a2c 100644 --- a/benchmark/parse/vector_tile.benchmark.cpp +++ b/benchmark/parse/vector_tile.benchmark.cpp @@ -22,6 +22,7 @@ static void Parse_VectorTile(benchmark::State& state) { } } } + (void)length; } } diff --git a/benchmark/util/tilecover.benchmark.cpp b/benchmark/util/tilecover.benchmark.cpp index e966875a6..dbac201bf 100644 --- a/benchmark/util/tilecover.benchmark.cpp +++ b/benchmark/util/tilecover.benchmark.cpp @@ -16,6 +16,7 @@ static void TileCountBounds(benchmark::State& state) { auto count = util::tileCount(sanFrancisco, 10); length += count; } + (void)length; } static void TileCoverPitchedViewport(benchmark::State& state) { @@ -29,6 +30,7 @@ static void TileCoverPitchedViewport(benchmark::State& state) { auto tiles = util::tileCover(transform.getState(), 8); length += tiles.size(); } + (void)length; } static void TileCoverBounds(benchmark::State& state) { @@ -37,6 +39,7 @@ static void TileCoverBounds(benchmark::State& state) { auto tiles = util::tileCover(sanFrancisco, 8); length += tiles.size(); } + (void)length; } static const auto geomPolygon = Polygon{ @@ -74,6 +77,7 @@ static void TileCoverPolygon(benchmark::State& state) { auto tiles = util::tileCover(geomPolygon, 8); length += tiles.size(); } + (void)length; } static void TileCountPolygon(benchmark::State& state) { @@ -83,6 +87,7 @@ static void TileCountPolygon(benchmark::State& state) { auto tiles = util::tileCount(geomPolygon, 16); length += tiles; } + (void)length; } BENCHMARK(TileCountBounds);