Skip to content

Commit

Permalink
tests/tcg: fix unused variable in linux-test
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221221090411.1995037-5-alex.bennee@linaro.org>
  • Loading branch information
stsquad committed Dec 21, 2022
1 parent 28a5fec commit 87f1bc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/tcg/multiarch/linux/linux-test.c
Expand Up @@ -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;
}
}
}
}
Expand Down

0 comments on commit 87f1bc1

Please sign in to comment.