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

Commit 91b33f18 authored by Aditya Kumar's avatar Aditya Kumar
Browse files

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
Change-Id: Idd45525cc3fe15c3b5e66332650ce8b7811ae026
parent 6a3c7c9b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {