summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2020-06-23 19:23:42 -0700
committerArian <arian.kulmer@web.de>2021-11-30 18:32:21 +0100
commitb21c1015fdae404e973bf79c6b5c2fa4f81e436e (patch)
tree3c7eb671e3ba30c2b086c0313f16bb13fea0b4d1
parentf7194a6e8aa13f40712840d62d6dd428b50fb4a3 (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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp
index 794ebc33..750e104d 100644
--- a/sdm/libs/hwc2/hwc_session.cpp
+++ b/sdm/libs/hwc2/hwc_session.cpp
@@ -809,8 +809,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();