diff options
author | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-29 22:51:49 +0000 |
---|---|---|
committer | hans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-29 22:51:49 +0000 |
commit | d0500757df411379d39f58163d88838b6f1eb0ec (patch) | |
tree | d6906d3fa46b5c14805fd3c939865d04bbc9ba9b /rlz/lib/string_utils.cc | |
parent | e3dfc745ef42c79db0c62c074d64e652a8f02284 (diff) | |
download | chromium_src-d0500757df411379d39f58163d88838b6f1eb0ec.zip chromium_src-d0500757df411379d39f58163d88838b6f1eb0ec.tar.gz chromium_src-d0500757df411379d39f58163d88838b6f1eb0ec.tar.bz2 |
Fix tautological compare in rlz.
This fixes this warning from a recent version of Clang:
rlz/lib/string_utils.cc:14:35: error: comparison of constant 128 with
expression of type 'char' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
return (letter >= 0x0 && letter < 0x80);
~~~~~~ ^ ~~~~
BUG=163104
Review URL: https://chromiumcodereview.appspot.com/11434029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'rlz/lib/string_utils.cc')
-rw-r--r-- | rlz/lib/string_utils.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rlz/lib/string_utils.cc b/rlz/lib/string_utils.cc index 50206a8..87988022 100644 --- a/rlz/lib/string_utils.cc +++ b/rlz/lib/string_utils.cc @@ -10,8 +10,8 @@ namespace rlz_lib { -bool IsAscii(char letter) { - return (letter >= 0x0 && letter < 0x80); +bool IsAscii(unsigned char letter) { + return letter < 0x80; } bool GetHexValue(char letter, int* value) { |