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

Unified Diff: source/i18n/decNumber.c

Issue 9420032: Take care of two Clang warnings. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/icu46/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/colldata.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/decNumber.c
===================================================================
--- source/i18n/decNumber.c (revision 122103)
+++ source/i18n/decNumber.c (working copy)
@@ -1502,7 +1502,14 @@
}
uprv_decNumberZero(w); /* set up 10... */
#if DECDPUN==1
+ #ifdef __clang__
Nico 2012/02/17 00:29:37 You don't need the #ifdef, compilers are supposed
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Warray-bounds"
+ #endif
w->lsu[1]=1; w->lsu[0]=0; /* .. */
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #endif
#else
w->lsu[0]=10; /* .. */
#endif
@@ -2934,6 +2941,10 @@
/* Set t=0.259, a=0.819 */
t->exponent=-3;
a->exponent=-3;
+ #ifdef __clang__
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Warray-bounds"
+ #endif
#if DECDPUN>=3
t->lsu[0]=259;
a->lsu[0]=819;
@@ -2944,6 +2955,9 @@
t->lsu[0]=9; t->lsu[1]=5; t->lsu[2]=2;
a->lsu[0]=9; a->lsu[1]=1; a->lsu[2]=8;
#endif
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #endif
}
else { /* odd exponent */
/* Set t=0.0819, a=2.59 */
@@ -2951,6 +2965,10 @@
exp++; /* e=e+1 */
t->exponent=-4;
a->exponent=-2;
+ #ifdef __clang__
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Warray-bounds"
+ #endif
#if DECDPUN>=3
t->lsu[0]=819;
a->lsu[0]=259;
@@ -2961,6 +2979,9 @@
t->lsu[0]=9; t->lsu[1]=1; t->lsu[2]=8;
a->lsu[0]=9; a->lsu[1]=5; a->lsu[2]=2;
#endif
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #endif
}
decMultiplyOp(a, a, f, &workset, &ignore); /* a=a*f */
@@ -5637,7 +5658,14 @@
/* lookaside fastpath code for ln(2) and ln(10) at common lengths */
if (rhs->exponent==0 && set->digits<=40) {
#if DECDPUN==1
+ #ifdef __clang__
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Warray-bounds"
+ #endif
if (rhs->lsu[0]==0 && rhs->lsu[1]==1 && rhs->digits==2) { /* ln(10) */
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #endif
#else
if (rhs->lsu[0]==10 && rhs->digits==2) { /* ln(10) */
#endif
« no previous file with comments | « source/i18n/colldata.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698