Index: base/strings/safe_sprintf_unittest.cc |
diff --git a/base/strings/safe_sprintf_unittest.cc b/base/strings/safe_sprintf_unittest.cc |
index 937fa4eca2329342377ce1596199b62bf3b37935..d9fb64689cc2d3bb81f5f361dd9f91c543f69283 100644 |
--- a/base/strings/safe_sprintf_unittest.cc |
+++ b/base/strings/safe_sprintf_unittest.cc |
@@ -416,7 +416,7 @@ void PrintLongString(char* buf, size_t sz) { |
// The text that was generated by SafeSPrintf() should always match the |
// equivalent text generated by sprintf(). Please note that the format |
- // string for sprintf() is nor complicated, as it does not have the |
+ // string for sprintf() is not complicated, as it does not have the |
// benefit of getting type information from the C++ compiler. |
// |
// N.B.: It would be so much cleaner to use snprintf(). But unfortunately, |
@@ -426,7 +426,8 @@ void PrintLongString(char* buf, size_t sz) { |
CHECK_LE(sz, sizeof(ref)); |
sprintf(ref, "A long string: %%d 00DEADBEEF %lld 0x%llX <NULL>", |
static_cast<long long>(std::numeric_limits<intptr_t>::min()), |
- (long long)PrintLongString); |
+ static_cast<unsigned long long>( |
+ reinterpret_cast<uintptr_t>(PrintLongString))); |
ref[sz-1] = '\000'; |
#if defined(NDEBUG) |