summaryrefslogtreecommitdiff
path: root/testing/fx_string_testhelpers.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-28 10:33:33 -0700
committerWei Li <weili@chromium.org>2016-03-28 10:33:33 -0700
commit8940993efffaaf432320509555dc61122b8b72b2 (patch)
tree2e9c42a78d96061ae06ee052e8a274ccfb8fcec7 /testing/fx_string_testhelpers.cpp
parentb5e8f14e3eefc5da995b332788d3203cee204883 (diff)
downloadpdfium-8940993efffaaf432320509555dc61122b8b72b2.tar.xz
Reduce signed/unsigned comparison warnings
The warnings generated by Clang. This is part 1 for some simple cases. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1840483003 .
Diffstat (limited to 'testing/fx_string_testhelpers.cpp')
-rw-r--r--testing/fx_string_testhelpers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/fx_string_testhelpers.cpp b/testing/fx_string_testhelpers.cpp
index e6b4a38397..b2d30f3a06 100644
--- a/testing/fx_string_testhelpers.cpp
+++ b/testing/fx_string_testhelpers.cpp
@@ -12,7 +12,8 @@ namespace {
template <typename T>
std::ostream& output_string(std::ostream& out, const T& str) {
out << std::hex << std::setfill('0') << '"';
- for (size_t i = 0; i < str.GetLength(); ++i) {
+ // This function is used for FX strings whose length is defined as int.
+ for (int i = 0; i < str.GetLength(); ++i) {
unsigned int c = str.GetAt(i);
if (c >= 0x20 && c < 0x7F) {
out << static_cast<char>(c);