Re: [PATCH] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-10-29 Thread Igor Mammedov
On Wed, 27 Oct 2021 17:59:44 +0200 Paolo Bonzini wrote: > On 27/10/21 09:45, Igor Mammedov wrote: > > If KVM is disabled or not present, qtest library build > > may fail with: > > libqtest.c: In function 'qtest_has_accel': > >comparison of unsigned expression < 0 is always false > >

Re: [PATCH] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-10-27 Thread Paolo Bonzini
On 27/10/21 09:45, Igor Mammedov wrote: If KVM is disabled or not present, qtest library build may fail with: libqtest.c: In function 'qtest_has_accel': comparison of unsigned expression < 0 is always false [-Werror=type-limits] for (i = 0; i < ARRAY_SIZE(targets); i++

Re: [PATCH] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-10-27 Thread Jason Andryuk
On Wed, Oct 27, 2021 at 4:34 AM Michael S. Tsirkin wrote: > > On Wed, Oct 27, 2021 at 03:45:42AM -0400, Igor Mammedov wrote: > > If KVM is disabled or not present, qtest library build > > may fail with: > >libqtest.c: In function 'qtest_has_accel': > > comparison of unsigned expression <

Re: [PATCH] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-10-27 Thread Michael S. Tsirkin
On Wed, Oct 27, 2021 at 03:45:42AM -0400, Igor Mammedov wrote: > If KVM is disabled or not present, qtest library build > may fail with: >libqtest.c: In function 'qtest_has_accel': > comparison of unsigned expression < 0 is always false > [-Werror=type-limits] > for (i = 0;

[PATCH] qtest: fix 'expression is always false' build failure in qtest_has_accel()

2021-10-27 Thread Igor Mammedov
If KVM is disabled or not present, qtest library build may fail with: libqtest.c: In function 'qtest_has_accel': comparison of unsigned expression < 0 is always false [-Werror=type-limits] for (i = 0; i < ARRAY_SIZE(targets); i++) { due to empty 'targets' array. Fix it by c