From bd274a3b7ab6a38119a13d2e8f56a9d22c82e43f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 16 Dec 2012 15:46:06 -0800 Subject: [PATCH] Fix test. --- format_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/format_test.cc b/format_test.cc index 5eeb9e81..1b0c8e91 100644 --- a/format_test.cc +++ b/format_test.cc @@ -479,7 +479,8 @@ void CheckUnknownTypes( const T &value, const char *types, const char *type_name) { char format[256], message[256]; const char *special = ".0123456789}"; - for (int c = CHAR_MIN; c <= CHAR_MAX; ++c) { + for (int i = CHAR_MIN; i <= CHAR_MAX; ++i) { + char c = i; if (std::strchr(types, c) || std::strchr(special, c) || !c) continue; sprintf(format, "{0:1%c}", c); if (std::isprint(c))