Detecting and fixing stringprintf.h format bugs

The print functions in stringprintf.h were not annotated for /analyze so
13 Windows specific format-string bugs accumulated. This annotates the
functions so that the /analyze builder will find the problems and fixes
the bugs.

[email protected],[email protected],[email protected]
Skipping wstring presubmit checks - no new wstring usage is added
NOPRESUBMIT=true
BUG=427616

Review URL: https://codereview.chromium.org/1372153002

Cr-Commit-Position: refs/heads/master@{#352659}
diff --git a/base/memory/shared_memory_win.cc b/base/memory/shared_memory_win.cc
index 3eef9a9..9665a7c2 100644
--- a/base/memory/shared_memory_win.cc
+++ b/base/memory/shared_memory_win.cc
@@ -146,7 +146,7 @@
     // So, we generate a random name when we need to enforce read-only.
     uint64_t rand_values[4];
     RandBytes(&rand_values, sizeof(rand_values));
-    name_ = StringPrintf(L"CrSharedMem_%016x%016x%016x%016x",
+    name_ = StringPrintf(L"CrSharedMem_%016llx%016llx%016llx%016llx",
                          rand_values[0], rand_values[1],
                          rand_values[2], rand_values[3]);
   }