[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] tests/tcg: fix unused variable in linux-test
From: |
Alex Bennée |
Subject: |
[PATCH v2 4/6] tests/tcg: fix unused variable in linux-test |
Date: |
Wed, 21 Dec 2022 09:04:09 +0000 |
The latest hexagon compiler picks up that we never consume wcount.
Given the name of the #define that rcount checks against is WCOUNT_MAX
I figured the check just got missed.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/tcg/multiarch/linux/linux-test.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/tcg/multiarch/linux/linux-test.c
b/tests/tcg/multiarch/linux/linux-test.c
index 5a2a4f2258..64f57cb287 100644
--- a/tests/tcg/multiarch/linux/linux-test.c
+++ b/tests/tcg/multiarch/linux/linux-test.c
@@ -354,13 +354,17 @@ static void test_pipe(void)
if (FD_ISSET(fds[0], &rfds)) {
chk_error(read(fds[0], &ch, 1));
rcount++;
- if (rcount >= WCOUNT_MAX)
+ if (rcount >= WCOUNT_MAX) {
break;
+ }
}
if (FD_ISSET(fds[1], &wfds)) {
ch = 'a';
chk_error(write(fds[1], &ch, 1));
wcount++;
+ if (wcount >= WCOUNT_MAX) {
+ break;
+ }
}
}
}
--
2.34.1
- [PATCH v2 0/6] current status of testing/next, Alex Bennée, 2022/12/21
- [PATCH v2 1/6] configure: Fix check-tcg not executing any tests, Alex Bennée, 2022/12/21
- [PATCH v2 4/6] tests/tcg: fix unused variable in linux-test,
Alex Bennée <=
- [PATCH v2 5/6] tests/docker: use prebuilt toolchain for debian-hexagon-cross, Alex Bennée, 2022/12/21
- [PATCH v2 6/6] gitlab-ci: Disable docs and GUIs for the build-tci and build-tcg-disabled jobs, Alex Bennée, 2022/12/21
- [PATCH v2 3/6] configure: repeat ourselves for the benefit of CI, Alex Bennée, 2022/12/21
- [PATCH v2 2/6] gitlab: turn off verbose logging for make check on custom runners, Alex Bennée, 2022/12/21
- Re: [PATCH v2 0/6] current status of testing/next, Philippe Mathieu-Daudé, 2022/12/21