From 8940993efffaaf432320509555dc61122b8b72b2 Mon Sep 17 00:00:00 2001 From: Wei Li Date: Mon, 28 Mar 2016 10:33:33 -0700 Subject: 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 . --- testing/fx_string_testhelpers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'testing') 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 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(c); -- cgit v1.2.3