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

2021-10-27 Thread Jason Andryuk
On Wed, Oct 27, 2021 at 11:10 AM 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 <

[PATCH v2] 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