From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Beraldo Leal" <bleal@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
fam@euphon.net, berrange@redhat.com, f4bug@amsat.org,
stefanha@redhat.com, crosa@redhat.com,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>
Subject: [[PATCH]--edit 4/6] tests/tcg: fix unused variable in linux-test
Date: Wed, 21 Dec 2022 07:42:50 +0000 [thread overview]
Message-ID: <20221221074252.1962896-5-alex.bennee@linaro.org> (raw)
In-Reply-To: <20221221074252.1962896-1-alex.bennee@linaro.org>
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
next prev parent reply other threads:[~2022-12-21 7:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 7:42 [[PATCH]--edit 0/6] current status of testing/next Alex Bennée
2022-12-21 7:42 ` [[PATCH]--edit 1/6] configure: Fix check-tcg not executing any tests Alex Bennée
2022-12-21 7:42 ` [[PATCH]--edit 2/6] gitlab: turn off verbose logging for make check on custom runners Alex Bennée
2022-12-21 7:42 ` [[PATCH]--edit 3/6] configure: repeat ourselves for the benefit of CI Alex Bennée
2022-12-21 8:53 ` Philippe Mathieu-Daudé
2022-12-21 7:42 ` Alex Bennée [this message]
2022-12-21 8:54 ` [[PATCH]--edit 4/6] tests/tcg: fix unused variable in linux-test Philippe Mathieu-Daudé
2022-12-21 7:42 ` [[PATCH]--edit 5/6] tests/docker: use prebuilt toolchain for debian-hexagon-cross Alex Bennée
2022-12-21 8:55 ` Philippe Mathieu-Daudé
2022-12-21 7:42 ` [[PATCH]--edit 6/6] gitlab-ci: Disable docs and GUIs for the build-tci and build-tcg-disabled jobs Alex Bennée
2022-12-21 8:56 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221221074252.1962896-5-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=f4bug@amsat.org \
--cc=fam@euphon.net \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).