Commit 19175845 authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Fix %u,%X/DWORD printf mismatches in base

In order to enable clang-cl's printf format string mismatch checking we
need to fix a few dozen existing errors. These are mostly places where
DWORD (unsigned long) is printed with %X or %u - an 'l' is needed.

R=thakis@chromium.org
BUG=751171

Change-Id: Ieb1aeeedb14c5725b51d460fc34c418abcafe68f
Reviewed-on: https://chromium-review.googlesource.com/596612Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491407}
parent f92c27db
......@@ -872,9 +872,9 @@ BASE_EXPORT std::string SystemErrorCodeToString(SystemErrorCode error_code) {
if (len) {
// Messages returned by system end with line breaks.
return base::CollapseWhitespaceASCII(msgbuf, true) +
base::StringPrintf(" (0x%X)", error_code);
base::StringPrintf(" (0x%lX)", error_code);
}
return base::StringPrintf("Error (0x%X) while retrieving error. (0x%X)",
return base::StringPrintf("Error (0x%lX) while retrieving error. (0x%lX)",
GetLastError(), error_code);
}
#elif defined(OS_POSIX)
......
......@@ -147,7 +147,7 @@ NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
} // namespace
std::string NativeLibraryLoadError::ToString() const {
return StringPrintf("%u", code);
return StringPrintf("%lu", code);
}
// static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment