Bug 1765474 - Fix unused-but-set-variable warning in TestBaseProfiler.cpp. r=gerald

mozglue/tests/TestBaseProfiler.cpp:2188:12: error: variable 'chunk1ReuseCount' set but not used [-Werror,-Wunused-but-set-variable]
  unsigned chunk1ReuseCount = 0;
           ^

Differential Revision: https://phabricator.services.mozilla.com/D144146
This commit is contained in:
Mike Hommey 2022-04-22 01:25:08 +00:00
parent f0ff0bc3aa
commit 0e99daec55

View File

@ -2157,8 +2157,6 @@ static void TestControlledChunkManagerWithLocalLimit() {
MOZ_RELEASE_ASSERT(!!chunk,
"First chunk immediate request should always work");
const auto chunkActualBufferBytes = chunk->BufferBytes();
// Keep address, for later checks.
const uintptr_t chunk1Address = reinterpret_cast<uintptr_t>(chunk.get());
MOZ_RELEASE_ASSERT(updateCount == 1,
"GetChunk should have triggered an update");
MOZ_RELEASE_ASSERT(
@ -2185,8 +2183,6 @@ static void TestControlledChunkManagerWithLocalLimit() {
ProfileBufferChunk::Length previousReleasedBytes = 0;
TimeStamp previousOldestDoneTimeStamp;
unsigned chunk1ReuseCount = 0;
// We will do enough loops to go through the maximum size a number of times.
const unsigned Rollovers = 3;
const unsigned Loops = Rollovers * MaxTotalBytes / chunkActualBufferBytes;
@ -2268,10 +2264,6 @@ static void TestControlledChunkManagerWithLocalLimit() {
// And cycle to the new chunk.
chunk = std::move(newChunk);
if (reinterpret_cast<uintptr_t>(chunk.get()) == chunk1Address) {
++chunk1ReuseCount;
}
}
// Enough testing! Clean-up.