Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1cba197 authored by Aditya Kumar's avatar Aditya Kumar
Browse files

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
parent 915cd5f0
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -486,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) {
void Scheduler::updatePhaseConfiguration(PhysicalDisplayId displayId, Fps refreshRate) {
    const bool isPacesetter =
    const bool isPacesetter =
            FTL_FAKE_GUARD(kMainThreadContext,
            FTL_FAKE_GUARD(kMainThreadContext,
@@ -497,6 +499,7 @@ void Scheduler::updatePhaseConfiguration(PhysicalDisplayId displayId, Fps refres
    setVsyncConfig(mVsyncModulator->setVsyncConfigSet(mVsyncConfiguration->getCurrentConfigs()),
    setVsyncConfig(mVsyncModulator->setVsyncConfigSet(mVsyncConfiguration->getCurrentConfigs()),
                   refreshRate.getPeriod());
                   refreshRate.getPeriod());
}
}
#pragma clang diagnostic pop


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