From b7e2e6ec0481d330785be7ba061375e4417f5071 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 3 Jul 2018 01:23:31 -0400 Subject: [PATCH] osdep: work around Coverity parsing errors 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. Backports commit a1a98357e3fdfce92b5ed0c6728489b9992fecb5 from qemu --- qemu/include/qemu/osdep.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/qemu/include/qemu/osdep.h b/qemu/include/qemu/osdep.h index f6069225..93be8e41 100644 --- a/qemu/include/qemu/osdep.h +++ b/qemu/include/qemu/osdep.h @@ -32,6 +32,20 @@ #include "config-target.h" #endif #include "qemu/compiler.h" +#ifdef __COVERITY__ +/* Coverity does not like the new _Float* types that are used by + * recent glibc, and croaks on every single file that includes + * stdlib.h. These typedefs are enough to please it. + * + * Note that these fix parse errors so they cannot be placed in + * scripts/coverity-model.c. + */ +typedef float _Float32; +typedef double _Float32x; +typedef double _Float64; +typedef __float80 _Float64x; +typedef __float128 _Float128; +#endif /* Older versions of C++ don't get definitions of various macros from * stdlib.h unless we define these macros before first inclusion of