[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] osdep: work around Coverity parsing errors

From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH] osdep: work around Coverity parsing errors
Date: Mon, 25 Jun 2018 18:06:58 +0200

Coverity does not like the new _Float* types that are used by
recent glibc, and croaks on every single file that includes
stdlib.h.  Add dummy typedefs to please it.

Signed-off-by: Paolo Bonzini <address@hidden>
        I've been using this patch for a couple months, and Peter pointed
        out that other projects are doing similar hacks.  So it's probably
        time to send it upstream.

        Note that this is a parse error, so it cannot be fixed in the
        model file.

 include/qemu/osdep.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 9ed62423c0..0084f3fa71 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -33,6 +33,14 @@
 #include "exec/poison.h"
+#ifdef __COVERITY__
+typedef float _Float32;
+typedef double _Float32x;
+typedef double _Float64;
+typedef __float80 _Float64x;
+typedef __float128 _Float128;
 #include "qemu/compiler.h"
 /* Older versions of C++ don't get definitions of various macros from

reply via email to

[Prev in Thread] Current Thread [Next in Thread]