From 34b2b007db875a6acb853c5cd2a247fbb32c0f88 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Fri, 20 Nov 2009 06:53:28 +0000 Subject: Add compiler-specific "examine printf format" attributes to printfs. Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/host_cache_unittest.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'net/base/host_cache_unittest.cc') diff --git a/net/base/host_cache_unittest.cc b/net/base/host_cache_unittest.cc index a879bed..b51b2e0 100644 --- a/net/base/host_cache_unittest.cc +++ b/net/base/host_cache_unittest.cc @@ -4,6 +4,7 @@ #include "net/base/host_cache.h" +#include "base/format_macros.h" #include "base/stl_util-inl.h" #include "base/string_util.h" #include "net/base/net_errors.h" @@ -302,7 +303,7 @@ TEST(HostCacheTest, KeyComparators) { }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { - SCOPED_TRACE(StringPrintf("Test[%d]", i)); + SCOPED_TRACE(StringPrintf("Test[%" PRIuS "]", i)); const HostCache::Key& key1 = tests[i].key1; const HostCache::Key& key2 = tests[i].key2; -- cgit v1.1