diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 14:28:30 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-16 14:28:30 +0000 |
commit | f07467d2f7344af716a90df0b54573b4fd9967e3 (patch) | |
tree | c8ae35b12a8e0f88b29ae5cb0e86d995a36154db /base/third_party | |
parent | 7b862a32d4f20c96e2a98c39e26b4c6b77f9e1cc (diff) | |
download | chromium_src-f07467d2f7344af716a90df0b54573b4fd9967e3.zip chromium_src-f07467d2f7344af716a90df0b54573b4fd9967e3.tar.gz chromium_src-f07467d2f7344af716a90df0b54573b4fd9967e3.tar.bz2 |
Working towards -Wextra
- Make loops use {} instead of a ';' to make it clear there is no body to the loop.
- Remove checks of unsigned values for <0
- coordinates should be CGFloat, not NSUInteger.
BUG=34160
TEST=none
Review URL: http://codereview.chromium.org/2865003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/third_party')
-rw-r--r-- | base/third_party/dmg_fp/README.chromium | 1 | ||||
-rw-r--r-- | base/third_party/dmg_fp/dtoa.cc | 4 | ||||
-rw-r--r-- | base/third_party/dmg_fp/g_fmt.cc | 6 | ||||
-rw-r--r-- | base/third_party/dmg_fp/mac_wextra.patch | 53 |
4 files changed, 59 insertions, 5 deletions
diff --git a/base/third_party/dmg_fp/README.chromium b/base/third_party/dmg_fp/README.chromium index d151349..f52c96a 100644 --- a/base/third_party/dmg_fp/README.chromium +++ b/base/third_party/dmg_fp/README.chromium @@ -13,3 +13,4 @@ List of changes made to original code: - made some minor changes to allow clean compilation under g++ -Wall, see gcc_warnings.patch. - made some minor changes to build on 64-bit, see gcc_64_bit.patch. + - made minor changes for -Wextra for Mac build, see mac_wextra.patch diff --git a/base/third_party/dmg_fp/dtoa.cc b/base/third_party/dmg_fp/dtoa.cc index c1bc476..3f7e794 100644 --- a/base/third_party/dmg_fp/dtoa.cc +++ b/base/third_party/dmg_fp/dtoa.cc @@ -3863,7 +3863,7 @@ dtoa if (dval(&u) > 0.5 + dval(&eps)) goto bump_up; else if (dval(&u) < 0.5 - dval(&eps)) { - while(*--s == '0'); + while(*--s == '0') {} s++; goto ret1; } @@ -4176,7 +4176,7 @@ dtoa #ifdef Honor_FLT_ROUNDS trimzeros: #endif - while(*--s == '0'); + while(*--s == '0') {} s++; } ret: diff --git a/base/third_party/dmg_fp/g_fmt.cc b/base/third_party/dmg_fp/g_fmt.cc index 7f3c881..d864eb7 100644 --- a/base/third_party/dmg_fp/g_fmt.cc +++ b/base/third_party/dmg_fp/g_fmt.cc @@ -46,7 +46,7 @@ g_fmt(register char *b, double x) if (sign) *b++ = '-'; if (decpt == 9999) /* Infinity or Nan */ { - while((*b++ = *s++)); + while((*b++ = *s++)) {} goto done0; } if (decpt <= -4 || decpt > se - s + 5) { @@ -64,7 +64,7 @@ g_fmt(register char *b, double x) } else *b++ = '+'; - for(j = 2, k = 10; 10*k <= decpt; j++, k *= 10); + for(j = 2, k = 10; 10*k <= decpt; j++, k *= 10) {} for(;;) { i = decpt / k; *b++ = i + '0'; @@ -79,7 +79,7 @@ g_fmt(register char *b, double x) *b++ = '.'; for(; decpt < 0; decpt++) *b++ = '0'; - while((*b++ = *s++)); + while((*b++ = *s++)) {} } else { while((*b = *s++)) { diff --git a/base/third_party/dmg_fp/mac_wextra.patch b/base/third_party/dmg_fp/mac_wextra.patch new file mode 100644 index 0000000..15340f2 --- /dev/null +++ b/base/third_party/dmg_fp/mac_wextra.patch @@ -0,0 +1,53 @@ +Index: g_fmt.cc +=================================================================== +--- g_fmt.cc (revision 49784) ++++ g_fmt.cc (working copy) +@@ -46,7 +46,7 @@ + if (sign) + *b++ = '-'; + if (decpt == 9999) /* Infinity or Nan */ { +- while((*b++ = *s++)); ++ while((*b++ = *s++)) {} + goto done0; + } + if (decpt <= -4 || decpt > se - s + 5) { +@@ -64,7 +64,7 @@ + } + else + *b++ = '+'; +- for(j = 2, k = 10; 10*k <= decpt; j++, k *= 10); ++ for(j = 2, k = 10; 10*k <= decpt; j++, k *= 10) {} + for(;;) { + i = decpt / k; + *b++ = i + '0'; +@@ -79,7 +79,7 @@ + *b++ = '.'; + for(; decpt < 0; decpt++) + *b++ = '0'; +- while((*b++ = *s++)); ++ while((*b++ = *s++)) {} + } + else { + while((*b = *s++)) { +Index: dtoa.cc +=================================================================== +--- dtoa.cc (revision 49784) ++++ dtoa.cc (working copy) +@@ -3863,7 +3863,7 @@ + if (dval(&u) > 0.5 + dval(&eps)) + goto bump_up; + else if (dval(&u) < 0.5 - dval(&eps)) { +- while(*--s == '0'); ++ while(*--s == '0') {} + s++; + goto ret1; + } +@@ -4176,7 +4176,7 @@ + #ifdef Honor_FLT_ROUNDS + trimzeros: + #endif +- while(*--s == '0'); ++ while(*--s == '0') {} + s++; + } + ret: |