diff options
| author | 2024-10-09 20:21:46 +0000 | |
|---|---|---|
| committer | 2024-11-20 22:16:32 +0000 | |
| commit | b7a1a99f1abe6ac0a8cc035db153a8721fefb02c (patch) | |
| tree | aea2af54b9c5b73d52839dd78c56691d8cc6036e | |
| parent | 8f68b1a6c9ec6781c8844ee7a5bcc84f1b2d50b1 (diff) | |
Disable -Wunused-value for surfaceflinger
```
out/soong/.intermediates/frameworks/native/services/surfaceflinger/Tracing/tools/layertracegenerator/android_x86_64_silvermont/obj/frameworks/native/services/surfaceflinger/Scheduler/Scheduler.o frameworks/native/services/surfaceflinger/Scheduler/Scheduler.cpp
frameworks/native/services/surfaceflinger/Scheduler/Scheduler.cpp:432:29: error: ignoring temporary created by a constructor declared with 'nodiscard' attribute [-Werror,-Wunused-value]
432 | (std::scoped_lock(mDisplayLock), displayId == mPacesetterDisplayId));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Flag: EXEMPT b/369277774
Bug: b/369277774
Merged-In: Idd45525cc3fe15c3b5e66332650ce8b7811ae026
Change-Id: Idd45525cc3fe15c3b5e66332650ce8b7811ae026
(cherry picked from commit 91b33f18ea5416bfde82cda7fc1b210d9338a835)
| -rw-r--r-- | services/surfaceflinger/Scheduler/Scheduler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp index 5e131548aa..b83ff19fe7 100644 --- a/services/surfaceflinger/Scheduler/Scheduler.cpp +++ b/services/surfaceflinger/Scheduler/Scheduler.cpp @@ -426,6 +426,8 @@ void Scheduler::onHdcpLevelsChanged(Cycle cycle, PhysicalDisplayId displayId, eventThreadFor(cycle).onHdcpLevelsChanged(displayId, connectedLevel, maxLevel); } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-value" // b/369277774 bool Scheduler::onDisplayModeChanged(PhysicalDisplayId displayId, const FrameRateMode& mode) { const bool isPacesetter = FTL_FAKE_GUARD(kMainThreadContext, @@ -446,6 +448,7 @@ bool Scheduler::onDisplayModeChanged(PhysicalDisplayId displayId, const FrameRat return isPacesetter; } +#pragma clang diagnostic pop void Scheduler::emitModeChangeIfNeeded() { if (!mPolicy.modeOpt || !mPolicy.emittedModeOpt) { @@ -483,6 +486,8 @@ void Scheduler::setDuration(Cycle cycle, std::chrono::nanoseconds workDuration, } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-value" // b/369277774 void Scheduler::updatePhaseConfiguration(PhysicalDisplayId displayId, Fps refreshRate) { const bool isPacesetter = FTL_FAKE_GUARD(kMainThreadContext, @@ -494,6 +499,7 @@ void Scheduler::updatePhaseConfiguration(PhysicalDisplayId displayId, Fps refres setVsyncConfig(mVsyncModulator->setVsyncConfigSet(mVsyncConfiguration->getCurrentConfigs()), refreshRate.getPeriod()); } +#pragma clang diagnostic pop void Scheduler::setActiveDisplayPowerModeForRefreshRateStats(hal::PowerMode powerMode) { mRefreshRateStats->setPowerMode(powerMode); @@ -909,6 +915,8 @@ void Scheduler::dumpVsync(std::string& out) const { } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-value" // b/369277774 void Scheduler::updateFrameRateOverrides(GlobalSignals consideredSignals, Fps displayRefreshRate) { const bool changed = (std::scoped_lock(mPolicyLock), updateFrameRateOverridesLocked(consideredSignals, displayRefreshRate)); @@ -917,6 +925,7 @@ void Scheduler::updateFrameRateOverrides(GlobalSignals consideredSignals, Fps di onFrameRateOverridesChanged(); } } +#pragma clang diagnostic pop bool Scheduler::updateFrameRateOverridesLocked(GlobalSignals consideredSignals, Fps displayRefreshRate) { |