From a9eb44aa5bc16497290e4643eae19e18bb4f6386 Mon Sep 17 00:00:00 2001 From: Sebastien Vincent Date: Wed, 24 Mar 2010 08:49:24 +0100 Subject: [PATCH] Fix build with g++-4.5. --- src/common/packet-metadata.h | 2 +- src/core/test.cc | 2 +- src/devices/mesh/dot11s/hwmp-protocol-mac.cc | 2 +- src/devices/mesh/dot11s/hwmp-protocol.cc | 2 +- src/devices/mesh/dot11s/peer-management-protocol-mac.cc | 4 ++-- src/devices/mesh/dot11s/peer-management-protocol.cc | 2 +- src/devices/mesh/mesh-wifi-interface-mac.cc | 2 +- src/node/drop-tail-queue.cc | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/common/packet-metadata.h b/src/common/packet-metadata.h index 835ec3376..ff1d94e0c 100644 --- a/src/common/packet-metadata.h +++ b/src/common/packet-metadata.h @@ -353,7 +353,7 @@ private: namespace ns3 { PacketMetadata::PacketMetadata (uint64_t uid, uint32_t size) - : m_data (m_data = PacketMetadata::Create (10)), + : m_data (PacketMetadata::Create (10)), m_head (0xffff), m_tail (0xffff), m_used (0), diff --git a/src/core/test.cc b/src/core/test.cc index ab1a691be..8e2fb6c8a 100644 --- a/src/core/test.cc +++ b/src/core/test.cc @@ -64,7 +64,7 @@ TestDoubleIsEqual (const double x1, const double x2, const double epsilon) // { double max = (fabs (x1) > fabs (x2)) ? x1 : x2; - frexp (max, &exponent); + (void)frexp (max, &exponent); } // diff --git a/src/devices/mesh/dot11s/hwmp-protocol-mac.cc b/src/devices/mesh/dot11s/hwmp-protocol-mac.cc index 3a1338969..db04f9cb7 100644 --- a/src/devices/mesh/dot11s/hwmp-protocol-mac.cc +++ b/src/devices/mesh/dot11s/hwmp-protocol-mac.cc @@ -474,7 +474,7 @@ HwmpProtocolMac::Report (std::ostream & os) const void HwmpProtocolMac::ResetStats () { - m_stats = Statistics::Statistics (); + m_stats = Statistics (); } } //namespace dot11s diff --git a/src/devices/mesh/dot11s/hwmp-protocol.cc b/src/devices/mesh/dot11s/hwmp-protocol.cc index ae9b39765..b32390eb4 100644 --- a/src/devices/mesh/dot11s/hwmp-protocol.cc +++ b/src/devices/mesh/dot11s/hwmp-protocol.cc @@ -1155,7 +1155,7 @@ HwmpProtocol::Report (std::ostream & os) const void HwmpProtocol::ResetStats () { - m_stats = Statistics::Statistics (); + m_stats = Statistics (); for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) { plugin->second->ResetStats (); diff --git a/src/devices/mesh/dot11s/peer-management-protocol-mac.cc b/src/devices/mesh/dot11s/peer-management-protocol-mac.cc index d23c502c5..246a61b63 100644 --- a/src/devices/mesh/dot11s/peer-management-protocol-mac.cc +++ b/src/devices/mesh/dot11s/peer-management-protocol-mac.cc @@ -264,7 +264,7 @@ PeerManagementProtocolMac::GetAddress () const } else { - return Mac48Address::Mac48Address (); + return Mac48Address (); } } void @@ -310,7 +310,7 @@ PeerManagementProtocolMac::Report (std::ostream & os) const void PeerManagementProtocolMac::ResetStats () { - m_stats = Statistics::Statistics (); + m_stats = Statistics (); } uint32_t PeerManagementProtocolMac::GetLinkMetric (Mac48Address peerAddress) diff --git a/src/devices/mesh/dot11s/peer-management-protocol.cc b/src/devices/mesh/dot11s/peer-management-protocol.cc index 6f7ff63c9..0be167bf1 100644 --- a/src/devices/mesh/dot11s/peer-management-protocol.cc +++ b/src/devices/mesh/dot11s/peer-management-protocol.cc @@ -555,7 +555,7 @@ PeerManagementProtocol::Report (std::ostream & os) const void PeerManagementProtocol::ResetStats () { - m_stats = Statistics::Statistics (m_stats.linksTotal); // don't reset number of links + m_stats = Statistics (m_stats.linksTotal); // don't reset number of links for (PeerManagementProtocolMacMap::const_iterator plugins = m_plugins.begin (); plugins != m_plugins.end (); plugins++) { plugins->second->ResetStats (); diff --git a/src/devices/mesh/mesh-wifi-interface-mac.cc b/src/devices/mesh/mesh-wifi-interface-mac.cc index 55807caf8..2195065b4 100644 --- a/src/devices/mesh/mesh-wifi-interface-mac.cc +++ b/src/devices/mesh/mesh-wifi-interface-mac.cc @@ -696,7 +696,7 @@ MeshWifiInterfaceMac::Report (std::ostream & os) const void MeshWifiInterfaceMac::ResetStats () { - m_stats = Statistics::Statistics (); + m_stats = Statistics (); } void MeshWifiInterfaceMac::SetQueue (AccessClass ac) diff --git a/src/node/drop-tail-queue.cc b/src/node/drop-tail-queue.cc index 7cf2d2134..956e98bad 100644 --- a/src/node/drop-tail-queue.cc +++ b/src/node/drop-tail-queue.cc @@ -115,7 +115,7 @@ DropTailQueue::DoDequeue (void) if (m_packets.empty()) { NS_LOG_LOGIC ("Queue empty"); - return false; + return 0; } Ptr p = m_packets.front (); @@ -138,7 +138,7 @@ DropTailQueue::DoPeek (void) const if (m_packets.empty()) { NS_LOG_LOGIC ("Queue empty"); - return false; + return 0; } Ptr p = m_packets.front ();