SF: Fix -Wunused-but-set-variable
Soong appends -Wno-error=unused-but-set-variable, negating SF's -Werror.
- The type and appId variables are VR remnants.
- TimeStats::canAddNewAggregatedStats compared apples and oranges.
Bug: 129481165
Test: No warnings on clean build
Change-Id: I071e71148a269bf9ab9a5e930a775b4ae6564916
diff --git a/services/surfaceflinger/TimeStats/TimeStats.cpp b/services/surfaceflinger/TimeStats/TimeStats.cpp
index 7c1f21f..bf2038b 100644
--- a/services/surfaceflinger/TimeStats/TimeStats.cpp
+++ b/services/surfaceflinger/TimeStats/TimeStats.cpp
@@ -564,7 +564,7 @@
layerRecords += record.second.stats.size();
}
- return mTimeStats.stats.size() < MAX_NUM_LAYER_STATS;
+ return layerRecords < MAX_NUM_LAYER_STATS;
}
void TimeStats::setPostTime(int32_t layerId, uint64_t frameNumber, const std::string& layerName,