summaryrefslogtreecommitdiffstats
path: root/rlz/lib
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-29 22:51:49 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-29 22:51:49 +0000
commitd0500757df411379d39f58163d88838b6f1eb0ec (patch)
treed6906d3fa46b5c14805fd3c939865d04bbc9ba9b /rlz/lib
parente3dfc745ef42c79db0c62c074d64e652a8f02284 (diff)
downloadchromium_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')
-rw-r--r--rlz/lib/string_utils.cc4
-rw-r--r--rlz/lib/string_utils.h2
2 files changed, 3 insertions, 3 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) {
diff --git a/rlz/lib/string_utils.h b/rlz/lib/string_utils.h
index 6f64e58..0893a6c 100644
--- a/rlz/lib/string_utils.h
+++ b/rlz/lib/string_utils.h
@@ -11,7 +11,7 @@
namespace rlz_lib {
-bool IsAscii(char letter);
+bool IsAscii(unsigned char letter);
bool BytesToString(const unsigned char* data,
int data_len,