[pt-PT] Added 20 words to autocorrect
[LibreOffice.git] / external / dtoa / coverity.patch
blob8fb1765315af116ca7e8ea4bae727efc6b61bbcd
1 --- dtor/src/dtoa.c.coverity
2 +++ dtor/src/dtoa.c
3 @@ -216,14 +216,14 @@
4 typedef unsigned Long ULong;
5 #endif
7 -#ifdef DEBUG
8 #include <assert.h>
10 +#ifdef DEBUG
11 #include "stdio.h"
12 #define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
13 #define Debug(x) x
14 int dtoa_stats[7]; /* strtod_{64,96,bigcomp},dtoa_{exact,64,96,bigcomp} */
15 #else
16 -#define assert(x) /*nothing*/
17 #define Debug(x) /*nothing*/
18 #endif
20 @@ -2301,6 +2301,7 @@
21 if ((y = d1)) {
22 if ((k = lo0bits(&y))) {
23 x[0] = y | z << (32 - k);
24 + assert(k < 32); /* https://bugs.python.org/issue23999 */
25 z >>= k;
27 else
28 @@ -3029,6 +3030,7 @@
29 || ((n = nbits & kmask) !=0
30 && hi0bits(x[k-1]) < 32-n)) {
31 rshift(b,1);
32 + /* coverity[dead_error_line] - not worth investigating */
33 if (++e > Emax)
34 goto ovfl;
36 @@ -3345,6 +3347,7 @@
37 if ((dd = s0[j++] - '0' - dig))
38 goto ret;
39 if (!b->x[0] && b->wds == 1) {
40 + /* coverity[copy_paste_error : FALSE] */
41 if (i < nd)
42 dd = 1;
43 goto ret;
44 @@ -3607,6 +3610,7 @@
45 switch(c = *++s) {
46 case '-':
47 esign = 1;
48 + /* fall through */
49 case '+':
50 c = *++s;