Bug 1160 - optimized build ‘plugin’ set but not used, g++4.6.0
authorJohn Abraham<john.abraham@gatech.edu>
Sat, 14 May 2011 04:50:07 -0400
changeset 7228 0202763b3998
parent 7227 9f045cf89be4
child 7229 5e4a07a48a68
Bug 1160 - optimized build ‘plugin’ set but not used, g++4.6.0
src/mesh/model/dot11s/peer-management-protocol.cc
--- a/src/mesh/model/dot11s/peer-management-protocol.cc	Sat May 14 04:47:05 2011 -0400
+++ b/src/mesh/model/dot11s/peer-management-protocol.cc	Sat May 14 04:50:07 2011 -0400
@@ -385,6 +385,9 @@
   NS_ASSERT (iface != m_peerLinks.end ());
   PeerManagementProtocolMacMap::const_iterator plugin = m_plugins.find (interface);
   NS_ASSERT (plugin != m_plugins.end ());
+  // cast plugin to void, to suppress 'plugin' set but not used, compiler warning
+  // in optimized builds
+  (void) plugin;
   std::map<uint32_t, Time>::const_iterator lastBeacon = m_lastBeacon.find (interface);
   std::map<uint32_t, Time>::const_iterator beaconInterval = m_beaconInterval.find (interface);
   if ((lastBeacon == m_lastBeacon.end ()) || (beaconInterval == m_beaconInterval.end ()))