Bug 577992 warning: unused variable ‘isSentinel’ in imgDiscardTracker::Reset
authortimeless@mozdev.org
Thu, 15 Jul 2010 15:55:04 +0300
changeset 47693 abc305305a1b8c87623775fdc2f61e9a02b6b31e
parent 47692 717a5256e3795afdd116ef785800b40f669436cc
child 47694 650265c94f37dadd3d7947001f03c3759d5d9f7c
push id14401
push usertimeless@mozdev.org
push dateThu, 15 Jul 2010 17:19:36 +0000
treeherdermozilla-central@018ef41768f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs577992
milestone2.0b2pre
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 577992 warning: unused variable ‘isSentinel’ in imgDiscardTracker::Reset r=bholley
modules/libpr0n/src/imgDiscardTracker.cpp
--- a/modules/libpr0n/src/imgDiscardTracker.cpp
+++ b/modules/libpr0n/src/imgDiscardTracker.cpp
@@ -53,29 +53,30 @@ static struct imgDiscardTrackerNode sHea
 /*
  * Puts an image in the back of the tracker queue. If the image is already
  * in the tracker, this removes it first.
  */
 nsresult
 imgDiscardTracker::Reset(imgDiscardTrackerNode *node)
 {
   nsresult rv;
+#ifdef DEBUG
   PRBool isSentinel = (node == &sSentinel);
 
   // Sanity check the node.
   NS_ABORT_IF_FALSE(isSentinel || node->curr, "Node doesn't point to anything!");
 
   // We should not call this function if we can't discard
   NS_ABORT_IF_FALSE(isSentinel || node->curr->CanDiscard(),
                     "trying to reset discarding but can't discard!");
 
   // As soon as an image becomes animated it is set non-discardable
   NS_ABORT_IF_FALSE(isSentinel || !node->curr->mAnim,
                     "Trying to reset discarding on animated image!");
-
+#endif
 
   // Initialize the first time through
   if (NS_UNLIKELY(!sInitialized)) {
     rv = Initialize();
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   // Remove the node if it's in the list.