summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing/protocol_parser.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 06:53:28 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-20 06:53:28 +0000
commit34b2b007db875a6acb853c5cd2a247fbb32c0f88 (patch)
tree6dc39bc9f10d6e8eedcdf14821ba9e96b5ccab51 /chrome/browser/safe_browsing/protocol_parser.cc
parent24b857793e27aded8d804a112a5fe6c77e28b081 (diff)
downloadchromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.zip
chromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.tar.gz
chromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.tar.bz2
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
Diffstat (limited to 'chrome/browser/safe_browsing/protocol_parser.cc')
-rw-r--r--chrome/browser/safe_browsing/protocol_parser.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index ce8474c..c2aa793 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -4,6 +4,8 @@
//
// Parse the data returned from the SafeBrowsing v2.1 protocol response.
+#include "chrome/browser/safe_browsing/protocol_parser.h"
+
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -12,8 +14,7 @@
#include <arpa/inet.h>
#endif
-#include "chrome/browser/safe_browsing/protocol_parser.h"
-
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/string_util.h"
@@ -115,7 +116,7 @@ void SafeBrowsingProtocolParser::FormatGetHash(
DCHECK(request);
// Format the request for GetHash.
- request->append(StringPrintf("%d:%d\n",
+ request->append(StringPrintf("%" PRIuS ":%" PRIuS "\n",
sizeof(SBPrefix),
sizeof(SBPrefix) * prefixes.size()));
for (size_t i = 0; i < prefixes.size(); ++i) {