Message ID | 20190312143640.32096-2-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,1/4] test-char: fix undefined behavior | expand |
diff --git a/tests/test-char.c b/tests/test-char.c index de328380c1..95ccfd3cdb 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -745,7 +745,7 @@ static void char_socket_server_test(gconstpointer opaque) Visitor *v; QemuThread thread; int ret; - bool reconnected; + bool reconnected = false; char *optstr; QemuOpts *opts;
Fixes the following failure with --enable-debug: /tmp/qemu-test/src/tests/test-char.c:838:10: runtime error: load of value 40, which is not a valid value for type bool SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /tmp/qemu-test/src/tests/test-char.c:838:10 in Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- tests/test-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)