[Libreoffice-commits] core.git: external/dtoa

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 3 13:00:04 UTC 2020


 external/dtoa/UnpackedTarball_dtoa.mk |    1 +
 external/dtoa/coverity.patch          |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

New commits:
commit 224ab38f747dcafe711c10b54ad53c52bda9e41d
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 3 09:49:28 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Mar 3 13:59:30 2020 +0100

    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 at redhat.com>

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;
+ 			}


More information about the Libreoffice-commits mailing list