Bug 553032 - use PRIuSIZE rather than %z in js; r=evilpie
authorTom Tromey <tom@tromey.com>
Fri, 14 Oct 2016 07:59:03 -0600
changeset 318959 a12133c22f121112c72c12dd0866ec4b3aabb31a
parent 318958 482223f975509866e1c2502fbc1ba6c56cc5c97d
child 318960 619ccb0d81f1adc30894807a13196d63ddbe7966
push id30855
push userryanvm@gmail.com
push dateFri, 21 Oct 2016 21:12:44 +0000
treeherdermozilla-central@5639a9f476d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersevilpie
bugs553032
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 553032 - use PRIuSIZE rather than %z in js; r=evilpie MozReview-Commit-ID: JqiWVZZOY7h
js/src/asmjs/WasmBinary.cpp
js/src/gc/Verifier.cpp
js/src/vm/String.cpp
--- a/js/src/asmjs/WasmBinary.cpp
+++ b/js/src/asmjs/WasmBinary.cpp
@@ -36,17 +36,18 @@ Decoder::fail(const char* msg, ...) {
         return false;
 
     return fail(Move(str));
 }
 
 bool
 Decoder::fail(UniqueChars msg) {
     MOZ_ASSERT(error_);
-    UniqueChars strWithOffset(JS_smprintf("at offset %zu: %s", currentOffset(), msg.get()));
+    UniqueChars strWithOffset(JS_smprintf("at offset %" PRIuSIZE ": %s",
+                                          currentOffset(), msg.get()));
     if (!strWithOffset)
         return false;
 
     *error_ = Move(strWithOffset);
     return false;
 }
 
 bool
--- a/js/src/gc/Verifier.cpp
+++ b/js/src/gc/Verifier.cpp
@@ -530,17 +530,17 @@ CheckHeapTracer::check(AutoLockForExclus
             stack.back().processed = true;
         }
     }
 
     if (oom)
         return;
 
     if (failures) {
-        fprintf(stderr, "Heap check: %zu failure(s) out of %" PRIu32 " pointers checked\n",
+        fprintf(stderr, "Heap check: %" PRIuSIZE " failure(s) out of %" PRIu32 " pointers checked\n",
                 failures, visited.count());
     }
     MOZ_RELEASE_ASSERT(failures == 0);
 }
 
 void
 js::gc::CheckHeapAfterGC(JSRuntime* rt)
 {
--- a/js/src/vm/String.cpp
+++ b/js/src/vm/String.cpp
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "vm/String-inl.h"
 
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/PodOperations.h"
 #include "mozilla/RangedPtr.h"
+#include "mozilla/SizePrintfMacros.h"
 #include "mozilla/TypeTraits.h"
 #include "mozilla/Unused.h"
 
 #include "gc/Marking.h"
 #include "js/UbiNode.h"
 #include "vm/SPSProfiler.h"
 
 #include "jscntxtinlines.h"
@@ -182,17 +183,17 @@ JSString::dumpRepresentation(FILE* fp, i
 }
 
 void
 JSString::dumpRepresentationHeader(FILE* fp, int indent, const char* subclass) const
 {
     uint32_t flags = d.u1.flags;
     // Print the string's address as an actual C++ expression, to facilitate
     // copy-and-paste into a debugger.
-    fprintf(fp, "((%s*) %p) length: %zu  flags: 0x%x", subclass, this, length(), flags);
+    fprintf(fp, "((%s*) %p) length: %" PRIuSIZE "  flags: 0x%x", subclass, this, length(), flags);
     if (flags & FLAT_BIT)               fputs(" FLAT", fp);
     if (flags & HAS_BASE_BIT)           fputs(" HAS_BASE", fp);
     if (flags & INLINE_CHARS_BIT)       fputs(" INLINE_CHARS", fp);
     if (flags & ATOM_BIT)               fputs(" ATOM", fp);
     if (isPermanentAtom())              fputs(" PERMANENT", fp);
     if (flags & LATIN1_CHARS_BIT)       fputs(" LATIN1", fp);
     fputc('\n', fp);
 }
@@ -698,17 +699,17 @@ JSDependentString::undepend(ExclusiveCon
 
 #ifdef DEBUG
 void
 JSDependentString::dumpRepresentation(FILE* fp, int indent) const
 {
     dumpRepresentationHeader(fp, indent, "JSDependentString");
     indent += 2;
 
-    fprintf(fp, "%*soffset: %zu\n", indent, "", baseOffset());
+    fprintf(fp, "%*soffset: %" PRIuSIZE "\n", indent, "", baseOffset());
     fprintf(fp, "%*sbase: ", indent, "");
     base()->dumpRepresentation(fp, indent);
 }
 #endif
 
 template <typename CharT>
 /* static */ bool
 JSFlatString::isIndexSlow(const CharT* s, size_t length, uint32_t* indexp)
@@ -1358,17 +1359,17 @@ NewStringCopyUTF8N<CanGC>(JSContext* cx,
 
 #ifdef DEBUG
 void
 JSExtensibleString::dumpRepresentation(FILE* fp, int indent) const
 {
     dumpRepresentationHeader(fp, indent, "JSExtensibleString");
     indent += 2;
 
-    fprintf(fp, "%*scapacity: %zu\n", indent, "", capacity());
+    fprintf(fp, "%*scapacity: %" PRIuSIZE "\n", indent, "", capacity());
     dumpRepresentationChars(fp, indent);
 }
 
 void
 JSInlineString::dumpRepresentation(FILE* fp, int indent) const
 {
     dumpRepresentationHeader(fp, indent,
                              isFatInline() ? "JSFatInlineString" : "JSThinInlineString");