Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: base/third_party/dmg_fp/gcc_warnings.patch

Issue 21093: Allow clean compilation of dmg_fp under g++ -Wall -Werror (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/third_party/dmg_fp/g_fmt.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 Index: dtoa.cc
2 ===================================================================
3 --- dtoa.cc (revision 9233)
4 +++ dtoa.cc (working copy)
5 @@ -515,7 +515,7 @@
6 #endif
7
8 ACQUIRE_DTOA_LOCK(0);
9 - if (rv = freelist[k]) {
10 + if ((rv = freelist[k])) {
11 freelist[k] = rv->next;
12 }
13 else {
14 @@ -794,7 +794,7 @@
15 xc0 = c->x;
16 #ifdef ULLong
17 for(; xb < xbe; xc0++) {
18 - if (y = *xb++) {
19 + if ((y = *xb++)) {
20 x = xa;
21 xc = xc0;
22 carry = 0;
23 @@ -876,7 +876,7 @@
24 int i;
25 static int p05[3] = { 5, 25, 125 };
26
27 - if (i = k & 3)
28 + if ((i = k & 3))
29 b = multadd(b, p05[i-1], 0);
30
31 if (!(k >>= 2))
32 @@ -957,7 +957,7 @@
33 z = *x++ >> k1;
34 }
35 while(x < xe);
36 - if (*x1 = z)
37 + if ((*x1 = z))
38 ++n1;
39 }
40 #else
41 @@ -1259,12 +1259,12 @@
42 z |= Exp_msk11;
43 #endif
44 #else
45 - if (de = (int)(d0 >> Exp_shift))
46 + if ((de = (int)(d0 >> Exp_shift)))
47 z |= Exp_msk1;
48 #endif
49 #ifdef Pack_32
50 - if (y = d1) {
51 - if (k = lo0bits(&y)) {
52 + if ((y = d1)) {
53 + if ((k = lo0bits(&y))) {
54 x[0] = y | z << 32 - k;
55 z >>= k;
56 }
57 @@ -1452,13 +1452,13 @@
58 #ifdef KR_headers
59 (sp, t) char **sp, *t;
60 #else
61 - (CONST char **sp, char *t)
62 + (CONST char **sp, CONST char *t)
63 #endif
64 {
65 int c, d;
66 CONST char *s = *sp;
67
68 - while(d = *t++) {
69 + while((d = *t++)) {
70 if ((c = *++s) >= 'A' && c <= 'Z')
71 c += 'a' - 'A';
72 if (c != d)
73 @@ -1490,7 +1490,7 @@
74 ++s;
75 if (s[1] == '0' && (s[2] == 'x' || s[2] == 'X'))
76 s += 2;
77 - while(c = *(CONST unsigned char*)++s) {
78 + while((c = *(CONST unsigned char*)++s)) {
79 if (c >= '0' && c <= '9')
80 c -= '0';
81 else if (c >= 'a' && c <= 'f')
82 @@ -1518,7 +1518,7 @@
83 *sp = s + 1;
84 break;
85 }
86 - } while(c = *++s);
87 + } while((c = *++s));
88 break;
89 }
90 #endif
91 @@ -1852,7 +1852,7 @@
92 /* Get starting approximation = rv * 10**e1 */
93
94 if (e1 > 0) {
95 - if (i = e1 & 15)
96 + if ((i = e1 & 15))
97 dval(rv) *= tens[i];
98 if (e1 &= ~15) {
99 if (e1 > DBL_MAX_10_EXP) {
100 @@ -1912,7 +1912,7 @@
101 }
102 else if (e1 < 0) {
103 e1 = -e1;
104 - if (i = e1 & 15)
105 + if ((i = e1 & 15))
106 dval(rv) /= tens[i];
107 if (e1 >>= 4) {
108 if (e1 >= 1 << n_bigtens)
109 @@ -2580,7 +2580,7 @@
110
111 j = sizeof(ULong);
112 for(k = 0;
113 - sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= i;
114 + sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (size_t)i;
115 j <<= 1)
116 k++;
117 r = (int*)Balloc(k);
118 @@ -2596,13 +2596,13 @@
119 #ifdef KR_headers
120 nrv_alloc(s, rve, n) char *s, **rve; int n;
121 #else
122 -nrv_alloc(char *s, char **rve, int n)
123 +nrv_alloc(CONST char *s, char **rve, int n)
124 #endif
125 {
126 char *rv, *t;
127
128 t = rv = rv_alloc(n);
129 - while(*t = *s++) t++;
130 + while((*t = *s++)) t++;
131 if (rve)
132 *rve = t;
133 return rv;
134 @@ -2707,7 +2707,7 @@
135 to hold the suppressed trailing zeros.
136 */
137
138 - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
139 + int bbits, b2, b5, be, dig, i, ieps, ilim = 0, ilim0, ilim1 = 0,
140 j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
141 spec_case, try_quick;
142 Long L;
143 @@ -2792,7 +2792,7 @@
144 #ifdef Sudden_Underflow
145 i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
146 #else
147 - if (i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1))) {
148 + if ((i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1)))) {
149 #endif
150 dval(d2) = dval(d);
151 word0(d2) &= Frac_mask1;
152 @@ -2946,7 +2946,7 @@
153 }
154 dval(d) /= ds;
155 }
156 - else if (j1 = -k) {
157 + else if ((j1 = -k)) {
158 dval(d) *= tens[j1 & 0xf];
159 for(j = j1 >> 4; j; j >>= 1, i++)
160 if (j & 1) {
161 @@ -3107,7 +3107,7 @@
162 Bfree(b);
163 b = b1;
164 }
165 - if (j = b5 - m5)
166 + if ((j = b5 - m5))
167 b = pow5mult(b, j);
168 }
169 else
170 @@ -3145,7 +3145,7 @@
171 * can do shifts and ors to compute the numerator for q.
172 */
173 #ifdef Pack_32
174 - if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f)
175 + if ((i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f))
176 i = 32 - i;
177 #else
178 if (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf)
179 @@ -3322,7 +3322,9 @@
180 ++*s++;
181 }
182 else {
183 +#ifdef Honor_FLT_ROUNDS
184 trimzeros:
185 +#endif
186 while(*--s == '0');
187 s++;
188 }
189 Index: g_fmt.cc
190 ===================================================================
191 --- g_fmt.cc (revision 9233)
192 +++ g_fmt.cc (working copy)
193 @@ -46,14 +46,14 @@
194 if (sign)
195 *b++ = '-';
196 if (decpt == 9999) /* Infinity or Nan */ {
197 - while(*b++ = *s++);
198 + while((*b++ = *s++));
199 goto done0;
200 }
201 if (decpt <= -4 || decpt > se - s + 5) {
202 *b++ = *s++;
203 if (*s) {
204 *b++ = '.';
205 - while(*b = *s++)
206 + while((*b = *s++))
207 b++;
208 }
209 *b++ = 'e';
210 @@ -79,10 +79,10 @@
211 *b++ = '.';
212 for(; decpt < 0; decpt++)
213 *b++ = '0';
214 - while(*b++ = *s++);
215 + while((*b++ = *s++));
216 }
217 else {
218 - while(*b = *s++) {
219 + while((*b = *s++)) {
220 b++;
221 if (--decpt == 0 && *s)
222 *b++ = '.';
223 @@ -93,7 +93,9 @@
224 }
225 done0:
226 freedtoa(s0);
227 +#ifdef IGNORE_ZERO_SIGN
228 done:
229 +#endif
230 return b0;
231 }
232
OLDNEW
« no previous file with comments | « base/third_party/dmg_fp/g_fmt.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698