No bug - Fix some unused variable warnings in optimized builds. r=me
authorBenjamin Peterson <benjamin@python.org>
Fri, 14 Mar 2014 23:07:03 -0500
changeset 191968 ba906e6a3b0b2cd69f60b0392befb4aa08a0450e
parent 191946 f19c420744bd384e599a2029e95919f84c07eff4
child 191969 b8eecfc351b6a2b302df17050890d8ed297b2d71
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
milestone30.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
No bug - Fix some unused variable warnings in optimized builds. r=me
js/src/vm/Runtime-inl.h
js/src/vm/SPSProfiler.cpp
--- a/js/src/vm/Runtime-inl.h
+++ b/js/src/vm/Runtime-inl.h
@@ -57,17 +57,18 @@ NewObjectCache::newObjectFromHit(JSConte
         heap = gc::TenuredHeap;
 
     if (cx->runtime()->upcomingZealousGC())
         return nullptr;
 
     // Trigger an identical allocation to the one that notified us of OOM
     // so that we trigger the right kind of GC automatically.
     if (allowGC) {
-        JSObject *obj = js::gc::AllocateObjectForCacheHit<allowGC>(cx, entry->kind, heap);
+        mozilla::DebugOnly<JSObject *> obj =
+            js::gc::AllocateObjectForCacheHit<allowGC>(cx, entry->kind, heap);
         JS_ASSERT(!obj);
         return nullptr;
     }
 
     JS_ASSERT(allowGC == NoGC);
     JSObject *obj = js::gc::AllocateObjectForCacheHit<NoGC>(cx, entry->kind, heap);
     if (obj) {
         copyCachedToObject(obj, templateObj, entry->kind);
--- a/js/src/vm/SPSProfiler.cpp
+++ b/js/src/vm/SPSProfiler.cpp
@@ -287,17 +287,17 @@ SPSProfiler::allocProfileString(JSScript
         len += lenAtom + 3; // +3 for the " (" and ")" it adds.
 
     // Allocate the buffer.
     char *cstr = js_pod_malloc<char>(len + 1);
     if (cstr == nullptr)
         return nullptr;
 
     // Construct the descriptive string.
-    size_t ret;
+    DebugOnly<size_t> ret;
     if (hasAtom)
         ret = JS_snprintf(cstr, len + 1, "%hs (%s:%llu)", atom, filename, lineno);
     else
         ret = JS_snprintf(cstr, len + 1, "%s:%llu", filename, lineno);
 
     MOZ_ASSERT(ret == len, "Computed length should match actual length!");
 
     return cstr;