summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorIgor Mammedov2021-10-27 17:10:12 +0200
committerMichael S. Tsirkin2021-11-01 23:49:10 +0100
commit44d3d8981402ce7eef435dd912f21fb84f1f7c4d (patch)
treec14290e9cb9b71e151c1a51da8f07849c83ff0f2 /meson.build
parentMerge remote-tracking branch 'remotes/philmd/tags/renesas-20211030' into staging (diff)
downloadqemu-44d3d8981402ce7eef435dd912f21fb84f1f7c4d.tar.gz
qemu-44d3d8981402ce7eef435dd912f21fb84f1f7c4d.tar.xz
qemu-44d3d8981402ce7eef435dd912f21fb84f1f7c4d.zip
qtest: fix 'expression is always false' build failure in qtest_has_accel()
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 making sure that CONFIG_KVM_TARGETS isn't empty. Fixes: e741aff0f43343 ("tests: qtest: add qtest_has_accel() to check if tested binary supports accelerator") Reported-by: Jason Andryuk <jandryuk@gmail.com> Suggested-by: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20211027151012.2639284-1-imammedo@redhat.com> Tested-by: Jason Andryuk <jandryuk@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index b092728397..ab4a5723f0 100644
--- a/meson.build
+++ b/meson.build
@@ -75,7 +75,7 @@ else
kvm_targets = []
endif
-kvm_targets_c = ''
+kvm_targets_c = '""'
if not get_option('kvm').disabled() and targetos == 'linux'
kvm_targets_c = '"' + '" ,"'.join(kvm_targets) + '"'
endif