summaryrefslogtreecommitdiff
path: root/external/dtoa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-03-04 17:37:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-03-04 22:12:47 +0100
commit22cbdc7b11e25ec8afc697096c008eac95022f02 (patch)
tree81b53cc658c243499a917f78d3cc33e101c79e2c /external/dtoa
parent368e9a829e07b3f8624898d69d2c00ec3bc590ec (diff)
always include assert.h and don't provide a different assert define
rely on the -DNDEBUG we pass in on non-debug builds to to disable assert Change-Id: I089be56aa6fcddb78507bb0f0457c67c226437a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89989 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external/dtoa')
-rw-r--r--external/dtoa/coverity.patch25
1 files changed, 21 insertions, 4 deletions
diff --git a/external/dtoa/coverity.patch b/external/dtoa/coverity.patch
index 3113e5dbc8ff..8fb1765315af 100644
--- a/external/dtoa/coverity.patch
+++ b/external/dtoa/coverity.patch
@@ -1,6 +1,23 @@
--- dtor/src/dtoa.c.coverity
+++ dtor/src/dtoa.c
-@@ -2303,6 +2303,7 @@
+@@ -216,14 +216,14 @@
+ typedef unsigned Long ULong;
+ #endif
+
+-#ifdef DEBUG
+ #include <assert.h>
++
++#ifdef DEBUG
+ #include "stdio.h"
+ #define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
+ #define Debug(x) x
+ int dtoa_stats[7]; /* strtod_{64,96,bigcomp},dtoa_{exact,64,96,bigcomp} */
+ #else
+-#define assert(x) /*nothing*/
+ #define Debug(x) /*nothing*/
+ #endif
+
+@@ -2301,6 +2301,7 @@
if ((y = d1)) {
if ((k = lo0bits(&y))) {
x[0] = y | z << (32 - k);
@@ -8,7 +25,7 @@
z >>= k;
}
else
-@@ -3031,6 +3032,7 @@
+@@ -3029,6 +3030,7 @@
|| ((n = nbits & kmask) !=0
&& hi0bits(x[k-1]) < 32-n)) {
rshift(b,1);
@@ -16,7 +33,7 @@
if (++e > Emax)
goto ovfl;
}
-@@ -3347,6 +3349,7 @@
+@@ -3345,6 +3347,7 @@
if ((dd = s0[j++] - '0' - dig))
goto ret;
if (!b->x[0] && b->wds == 1) {
@@ -24,7 +41,7 @@
if (i < nd)
dd = 1;
goto ret;
-@@ -3609,6 +3612,7 @@
+@@ -3607,6 +3610,7 @@
switch(c = *++s) {
case '-':
esign = 1;