Bug 621144 - (void) annotation for setjmp to silence coverity warning. r=timeless
authorIgor Bukanov <igor@mir2.org>
Thu, 23 Dec 2010 16:18:36 +0100
changeset 59920 cdf65c66cfbd585a2ec855786b668851df4beec1
parent 59919 e02379fdaf428e9a3542ba7da3484d669255e608
child 59921 3e32efb4e937598590b9d3a22551c18673b61aef
push id17820
push usercleary@mozilla.com
push dateTue, 04 Jan 2011 21:40:57 +0000
treeherdermozilla-central@969691cfe40e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstimeless
bugs621144
milestone2.0b8pre
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 621144 - (void) annotation for setjmp to silence coverity warning. r=timeless
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -781,26 +781,28 @@ MarkConservativeStackRoots(JSTracer *trc
 
 JS_NEVER_INLINE void
 ConservativeGCThreadData::recordStackTop()
 {
     /* Update the native stack pointer if it points to a bigger stack. */
     jsuword dummy;
     nativeStackTop = &dummy;
 
-    /* Update the register snapshot with the latest values. */
+    /*
+     * To record and update the register snapshot for the conservative
+     * scanning with the latest values we use setjmp.
+     */
 #if defined(_MSC_VER)
 # pragma warning(push)
 # pragma warning(disable: 4611)
 #endif
-    setjmp(registerSnapshot.jmpbuf);
+    (void) setjmp(registerSnapshot.jmpbuf);
 #if defined(_MSC_VER)
 # pragma warning(pop)
 #endif
-
 }
 
 static inline void
 RecordNativeStackTopForGC(JSContext *cx)
 {
     ConservativeGCThreadData *ctd = &JS_THREAD_DATA(cx)->conservativeGC;
 
 #ifdef JS_THREADSAFE