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:
system/logging/logd/SimpleLogBuffer.h:66:50: error: returning
variable 'logs_' by reference requires holding mutex 'logd_lock'
exclusively [-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: Ic80c9a65c3c8289f5f398125c6b742e253454b40
Bug: 353326122
Test: make
2 files changed
tree: 8978cb29196d37e34bec8c54e02fdf7115a1aa02
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/
  5. rust/
  6. OWNERS
  7. PREUPLOAD.cfg
  8. TEST_MAPPING