diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 20:29:49 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 20:29:49 +0000 |
commit | 8c026e7a5ab2077eb8381e7b79a78020624a5a64 (patch) | |
tree | e2d890dbc27cf7e54dce0fb053df0d12009896da /base | |
parent | 9f9bfb9fdc8d17493855c7a211351ff9e49092b0 (diff) | |
download | chromium_src-8c026e7a5ab2077eb8381e7b79a78020624a5a64.zip chromium_src-8c026e7a5ab2077eb8381e7b79a78020624a5a64.tar.gz chromium_src-8c026e7a5ab2077eb8381e7b79a78020624a5a64.tar.bz2 |
crosstool's gcc gives lots of warnings like
"warning: suggest parentheses around && within ||"
For base/string_util.cc, just add the suggested parentheses.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/string_util.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/base/string_util.cc b/base/string_util.cc index cce635e..1a18dd0 100644 --- a/base/string_util.cc +++ b/base/string_util.cc @@ -609,13 +609,13 @@ static bool IsStringUTF8T(const CHAR* str) { return false; // end of string but not end of character sequence // non-character : EF BF [BE-BF] or F[0-7] [89AB]F BF [BE-BF] - if (nonchar && (!positions_left && c < 0xBE || - positions_left == 1 && c != 0xBF || - positions_left == 2 && 0x0F != (0x0F & c) )) { + if (nonchar && ((!positions_left && c < 0xBE) || + (positions_left == 1 && c != 0xBF) || + (positions_left == 2 && 0x0F != (0x0F & c) ))) { nonchar = false; } - if (!IsInUTF8Sequence(c) || overlong && c <= olupper || - surrogate && slower <= c || nonchar && !positions_left ) { + if (!IsInUTF8Sequence(c) || (overlong && c <= olupper) || + (surrogate && slower <= c) || (nonchar && !positions_left) ) { return false; } overlong = surrogate = false; |