Skip to content

Commit

Permalink
osdep: work around Coverity parsing errors
Browse files Browse the repository at this point in the history
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.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Jun 28, 2018
1 parent 178003e commit a1a9835
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/qemu/osdep.h
Expand Up @@ -33,6 +33,21 @@
#else
#include "exec/poison.h"
#endif
#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

#include "qemu/compiler.h"

/* Older versions of C++ don't get definitions of various macros from
Expand Down

0 comments on commit a1a9835

Please sign in to comment.