Skip to content

Commit f1cba19

Browse files
committed
Disable -Wunused-value for updatePhaseConfiguration
``` frameworks/native/services/surfaceflinger/Scheduler/Scheduler.cpp:492:29: error: ignoring temporary created by a constructor declared with 'nodiscard' attribute [-Werror,-Wunused-value] 492 | (std::scoped_lock(mDisplayLock), displayId == mPacesetterDisplayId)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Flag: EXEMPT b/369277774 Bug: b/369277774 Change-Id: I183f22a881120156211e3296f022c8e52a47a39f
1 parent 915cd5f commit f1cba19

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

services/surfaceflinger/Scheduler/Scheduler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ void Scheduler::setDuration(Cycle cycle, std::chrono::nanoseconds workDuration,
486486
}
487487
}
488488

489+
#pragma clang diagnostic push
490+
#pragma clang diagnostic ignored "-Wunused-value" // b/369277774
489491
void Scheduler::updatePhaseConfiguration(PhysicalDisplayId displayId, Fps refreshRate) {
490492
const bool isPacesetter =
491493
FTL_FAKE_GUARD(kMainThreadContext,
@@ -497,6 +499,7 @@ void Scheduler::updatePhaseConfiguration(PhysicalDisplayId displayId, Fps refres
497499
setVsyncConfig(mVsyncModulator->setVsyncConfigSet(mVsyncConfiguration->getCurrentConfigs()),
498500
refreshRate.getPeriod());
499501
}
502+
#pragma clang diagnostic pop
500503

501504
void Scheduler::setActiveDisplayPowerModeForRefreshRateStats(hal::PowerMode powerMode) {
502505
mRefreshRateStats->setPowerMode(powerMode);

0 commit comments

Comments
 (0)