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
1 file changed