Bug 1073003 - Fix -Wunused-variable in Nuwa.cpp. r=glandium
authorBotond Ballo <botond@mozilla.com>
Tue, 23 Dec 2014 03:21:24 -0500
changeset 222561 e186ff7a5b4038b8f96285cc884f2fbd7fe652a9
parent 222560 0340001fb80a110b70d8a4fd0ea1f6b5cca51d1a
child 222562 6d55adbfd24d6f80b4868d4b1b4d8c6c8940994a
push id28068
push usercbook@mozilla.com
push dateThu, 08 Jan 2015 13:16:34 +0000
treeherdermozilla-central@2880e05d5e32 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1073003
milestone37.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 1073003 - Fix -Wunused-variable in Nuwa.cpp. r=glandium
mozglue/build/Nuwa.cpp
--- a/mozglue/build/Nuwa.cpp
+++ b/mozglue/build/Nuwa.cpp
@@ -904,21 +904,26 @@ static int sRecreateGatePassed = 0;
  *    and longjmp() in the spawned process. If freezing is enabled, then the
  *    current thread blocks by acquiring an already locked mutex,
  *    sThreadFreezeLock.
  * 2) The wrapped function: the function that might block waiting for some
  *    resource or condition.
  * 3) Freeze point 2: blocks the current thread by acquiring sThreadFreezeLock.
  *    If freezing is not enabled then revert the counter change in freeze
  *    point 1.
+ *
+ * Note: the purpose of the '(void) variable;' statements is to avoid
+ *       -Wunused-but-set-variable warnings.
  */
 #define THREAD_FREEZE_POINT1()                                 \
   bool freezeCountChg = false;                                 \
   bool recreated = false;                                      \
+  (void) recreated;                                            \
   volatile bool freezePoint2 = false;                          \
+  (void) freezePoint2;                                         \
   thread_info_t *tinfo;                                        \
   if (sIsNuwaProcess &&                                        \
       (tinfo = CUR_THREAD_INFO) &&                             \
       (tinfo->flags & TINFO_FLAG_NUWA_SUPPORT) &&              \
       !(tinfo->flags & TINFO_FLAG_NUWA_EXPLICIT_CHECKPOINT)) { \
     if (!setjmp(tinfo->jmpEnv)) {                              \
       REAL(pthread_mutex_lock)(&sThreadCountLock);             \
       SaveTLSInfo(tinfo);                                      \