summaryrefslogtreecommitdiff
path: root/external/dtoa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-03-03 09:49:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-03-03 13:59:30 +0100
commit224ab38f747dcafe711c10b54ad53c52bda9e41d (patch)
tree3e01c6326a63dd5f36c4f36a6dbd23f0f8057291 /external/dtoa
parent43518b29fddc7b824bdb1f7c8d2efcd220d6bc72 (diff)
silence dtoa coverity warnings
there isn't a --with-system-dtoa option so add an explicit patch Change-Id: I6ae00fefd3352b1501da3e94e108d3183f951907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89870 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external/dtoa')
-rw-r--r--external/dtoa/UnpackedTarball_dtoa.mk1
-rw-r--r--external/dtoa/coverity.patch34
2 files changed, 35 insertions, 0 deletions
diff --git a/external/dtoa/UnpackedTarball_dtoa.mk b/external/dtoa/UnpackedTarball_dtoa.mk
index c700b485fe8c..d0173408ce79 100644
--- a/external/dtoa/UnpackedTarball_dtoa.mk
+++ b/external/dtoa/UnpackedTarball_dtoa.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,dtoa,1))
$(eval $(call gb_UnpackedTarball_add_patches,dtoa, \
external/dtoa/include_header.patch \
+ external/dtoa/coverity.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/dtoa/coverity.patch b/external/dtoa/coverity.patch
new file mode 100644
index 000000000000..3113e5dbc8ff
--- /dev/null
+++ b/external/dtoa/coverity.patch
@@ -0,0 +1,34 @@
+--- dtor/src/dtoa.c.coverity
++++ dtor/src/dtoa.c
+@@ -2303,6 +2303,7 @@
+ if ((y = d1)) {
+ if ((k = lo0bits(&y))) {
+ x[0] = y | z << (32 - k);
++ assert(k < 32); /* https://bugs.python.org/issue23999 */
+ z >>= k;
+ }
+ else
+@@ -3031,6 +3032,7 @@
+ || ((n = nbits & kmask) !=0
+ && hi0bits(x[k-1]) < 32-n)) {
+ rshift(b,1);
++ /* coverity[dead_error_line] - not worth investigating */
+ if (++e > Emax)
+ goto ovfl;
+ }
+@@ -3347,6 +3349,7 @@
+ if ((dd = s0[j++] - '0' - dig))
+ goto ret;
+ if (!b->x[0] && b->wds == 1) {
++ /* coverity[copy_paste_error : FALSE] */
+ if (i < nd)
+ dd = 1;
+ goto ret;
+@@ -3609,6 +3612,7 @@
+ switch(c = *++s) {
+ case '-':
+ esign = 1;
++ /* fall through */
+ case '+':
+ c = *++s;
+ }