diff options
author | George Burgess IV <gbiv@google.com> | 2020-06-23 19:23:42 -0700 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-09-05 22:00:03 +0800 |
commit | 20299a375dc8326bc30016930e75e248144a7965 (patch) | |
tree | fab69026ba648c80ddf8aa5e265f6c46721a7133 | |
parent | 20a322d7753578a6af16670517c2f489c9b01374 (diff) |
hwc_session: move a break
As written, this loop only runs once, which makes clang's new warning
unhappy:
hardware/qcom/sm8150/display/sdm/libs/hwc2/hwc_session.cpp:934:51:
error: loop will run at most once (loop increment never executed)
[-Werror,-Wunreachable-code-loop-increment]
Chatting with qcom, this appears to be a bug, and the best fix is to
move the `break` into the `if`.
Bug: 150166387
Test: TreeHugger
Change-Id: Icb64eed5b894b9188f5265094587dd802207ba66
-rw-r--r-- | sdm/libs/hwc2/hwc_session.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp index 21be352f..8d4f653f 100644 --- a/sdm/libs/hwc2/hwc_session.cpp +++ b/sdm/libs/hwc2/hwc_session.cpp @@ -833,8 +833,8 @@ void HWCSession::HandlePendingRefresh() { for (size_t i = 0; i < pending_refresh_.size(); i++) { if (pending_refresh_.test(i)) { Refresh(i); + break; } - break; } pending_refresh_.reset(); |