From 71f54fe93cc20ac23c317fd6c7aa93732e9aa766 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 26 Sep 2018 10:19:39 +0200 Subject: [PATCH] coverity fixups --- scripts/coverity.sh | 11 ++++++++++- src/php_http_api.h | 8 ++++++++ src/php_http_buffer.c | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/coverity.sh b/scripts/coverity.sh index 08a04f1..883fd26 100755 --- a/scripts/coverity.sh +++ b/scripts/coverity.sh @@ -17,9 +17,18 @@ phpize ./configure make clean - + $COVERITY_BIN --dir $COVERITY_BUILD_DIR/cov-int make -j8 +echo >&2 +echo -n "Submit results to scan.coverity.com? (y/N) " >&2 +read submit +echo >&2 + +if test "$submit" != "y"; then + exit +fi + pushd $COVERITY_BUILD_DIR tar -czf cov-int{.tgz,} popd diff --git a/src/php_http_api.h b/src/php_http_api.h index 91b2eb6..bca57f1 100644 --- a/src/php_http_api.h +++ b/src/php_http_api.h @@ -13,6 +13,14 @@ #ifndef PHP_HTTP_API_H #define PHP_HTTP_API_H +#ifdef __COVERITY_GCC_VERSION_AT_LEAST +# define _Float128 float +# define _Float64 float +# define _Float32 float +# define _Float64x float +# define _Float32x float +#endif + #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/src/php_http_buffer.c b/src/php_http_buffer.c index c865065..5913cfc 100644 --- a/src/php_http_buffer.c +++ b/src/php_http_buffer.c @@ -10,7 +10,7 @@ +--------------------------------------------------------------------+ */ -#include "php.h" +#include "php_http_api.h" #include "php_http_buffer.h" PHP_HTTP_BUFFER_API php_http_buffer_t *php_http_buffer_init_ex( -- 2.30.2