Page MenuHomePhabricator

refactor: Do not discard try_lock() return value
ClosedPublic

Authored by Fabien on Jun 7 2023, 13:31.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC6b2f9a78f408: refactor: Do not discard try_lock() return value
Summary
Microsoft's C++ Standard Library uses the [[nodiscard]] attribute for try_lock().
See: https://github.com/microsoft/STL/blob/main/stl/inc/mutex

It appears the same issue occurs with GCC 13.1.

Backport of core#26189.

Test Plan

With debug and GCC 13.1:

ninja all check-all

It should return no warning.