mirror of https://github.com/xemu-project/xemu.git
tests/tcg: fix unused variable in linux-test
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>
(cherry picked from commit 2bc6c79417
)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
7c8a67ed46
commit
9d46d348f6
tests/tcg/multiarch/linux
|
@ -354,13 +354,17 @@ static void test_pipe(void)
|
||||||
if (FD_ISSET(fds[0], &rfds)) {
|
if (FD_ISSET(fds[0], &rfds)) {
|
||||||
chk_error(read(fds[0], &ch, 1));
|
chk_error(read(fds[0], &ch, 1));
|
||||||
rcount++;
|
rcount++;
|
||||||
if (rcount >= WCOUNT_MAX)
|
if (rcount >= WCOUNT_MAX) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (FD_ISSET(fds[1], &wfds)) {
|
if (FD_ISSET(fds[1], &wfds)) {
|
||||||
ch = 'a';
|
ch = 'a';
|
||||||
chk_error(write(fds[1], &ch, 1));
|
chk_error(write(fds[1], &ch, 1));
|
||||||
wcount++;
|
wcount++;
|
||||||
|
if (wcount >= WCOUNT_MAX) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue