From: Andrea Bolognani Date: Wed, 13 Jul 2016 16:53:22 +0000 (+0200) Subject: tests: command: Fix build on ppc64/aarch64 X-Git-Tag: v2.1.0-rc1~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bcbf724151e2c37208bad1e47a92d60784291b6;p=thirdparty%2Flibvirt.git tests: command: Fix build on ppc64/aarch64 Commit ca10bb040fcf introduced a new test that fails to build on at least some architectures: commandtest.c: In function 'test25': commandtest.c:1121:5: error: comparison is always true due to limited range of data type [-Werror=type-limits] if (rv >= 0) { ^ Change the type of 'rv' from char to int, which is the proper return type for virCommandExec() anyway. --- diff --git a/tests/commandtest.c b/tests/commandtest.c index 2b77b9b6d9..7bf5447ad2 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -1068,7 +1068,7 @@ static int test25(const void *unused ATTRIBUTE_UNUSED) { int ret = -1; int pipeFD[2] = { -1, -1}; - char rv = 0; + int rv = 0; ssize_t tries = 100; pid_t pid;