Bug 1073003 - Fix -Wunused-variable in Nuwa.cpp. r=glandium
authorBotond Ballo <botond@mozilla.com>
Tue, 23 Dec 2014 03:21:24 -0500
changeset 239299 e186ff7a5b4038b8f96285cc884f2fbd7fe652a9
parent 239298 0340001fb80a110b70d8a4fd0ea1f6b5cca51d1a
child 239300 6d55adbfd24d6f80b4868d4b1b4d8c6c8940994a
push id7472
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 20:36:27 +0000
treeherdermozilla-aurora@300ca104f8fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1073003
milestone37.0a1
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);                                      \