Bug 1159 - opt build wifi module unused variables
authorJohn Abraham<john.abraham@gatech.edu>
Sat, 14 May 2011 04:47:05 -0400
changeset 7227 9f045cf89be4
parent 7226 6396b9384525
child 7228 0202763b3998
Bug 1159 - opt build wifi module unused variables
src/wifi/model/wifi-information-element.cc
src/wifi/model/wifi-remote-station-manager.cc
--- a/src/wifi/model/wifi-information-element.cc	Sat May 14 04:44:48 2011 -0400
+++ b/src/wifi/model/wifi-information-element.cc	Sat May 14 04:47:05 2011 -0400
@@ -55,6 +55,9 @@
   // This IE was not optional, so confirm that we did actually
   // deserialise something.
   NS_ASSERT (i.GetDistanceFrom (start) != 0);
+  // cast start to void, to suppress ‘start’ set but not used
+  // compiler warning in optimized builds
+  (void) start;
   return i;
 }
 
--- a/src/wifi/model/wifi-remote-station-manager.cc	Sat May 14 04:44:48 2011 -0400
+++ b/src/wifi/model/wifi-remote-station-manager.cc	Sat May 14 04:47:05 2011 -0400
@@ -368,6 +368,9 @@
       bool found;
       found = ConstCast<Packet> (packet)->PeekPacketTag (tag);
       NS_ASSERT (found);
+      // cast found to void, to suppress 'found' set but not used
+      // compiler warning
+      (void) found;
       return tag.GetDataMode ();
     }
   return DoGetDataMode (Lookup (address, header), fullPacketSize);
@@ -383,6 +386,9 @@
       bool found;
       found = ConstCast<Packet> (packet)->PeekPacketTag (tag);
       NS_ASSERT (found);
+      // cast found to void, to suppress 'found' set but not used
+      // compiler warning
+      (void) found;
       return tag.GetRtsMode ();
     }
   return DoGetRtsMode (Lookup (address, header));