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/BufferLayerConsumer.cpp b/services/surfaceflinger/BufferLayerConsumer.cpp
index 96b2247..c79fa11 100644
--- a/services/surfaceflinger/BufferLayerConsumer.cpp
+++ b/services/surfaceflinger/BufferLayerConsumer.cpp
@@ -438,7 +438,7 @@
}
void BufferLayerConsumer::onSidebandStreamChanged() {
- FrameAvailableListener* unsafeFrameAvailableListener = nullptr;
+ [[maybe_unused]] FrameAvailableListener* unsafeFrameAvailableListener = nullptr;
{
Mutex::Autolock lock(mFrameAvailableMutex);
unsafeFrameAvailableListener = mFrameAvailableListener.unsafe_get();