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

Skip to content
Commit 81da2ab9 authored by Liz Prucka's avatar Liz Prucka
Browse files

Error fix from enabling Clang thread-safety checks.

Parent bug: b/353324127. Enabling `thread-safety-reference-return`
to allow developers to utilize Clang thread safety guardrails
(GUARDED_BY, REQUIRES, EXCLUDES).

Error:
frameworks/native/services/surfaceflinger/Scheduler/RefreshRateSelector.h:307:55:
error: returning variable 'mDisplayModes' by reference requires holding
mutex 'mLock' [-Werror,-Wthread-safety-reference-return]

Fix: return by value, hold mutex from parent, or remove GUARDED_BY
attribute.

This fix removes the GUARDED_BY attribute in order to avoid changing
functionality. If this is not desired, please respond with concerns
or preferred fix.

Change-Id: Ia3444fd193294e1478a9f830651eb8dabf2c73cd
Bug: 354740314
Test: make
parent a42f727d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment