# HG changeset patch # User Timo Bingmann # Date 1233749284 -3600 # Node ID 0ad61c84f3c6bf4f19532c9f7a9c8b417a09fd83 # Parent 3e819441bc7560ca169fd50cc7c8afb12a3711ab Syntactical source code changes to enable compilation with icc (without -W). diff -r 3e819441bc75 -r 0ad61c84f3c6 examples/csma-star.cc --- a/examples/csma-star.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/examples/csma-star.cc Wed Feb 04 13:08:04 2009 +0100 @@ -19,6 +19,7 @@ #include "ns3/simulator-module.h" #include "ns3/node-module.h" #include "ns3/helper-module.h" +#include "ns3/csma-module.h" #include "ns3/global-route-manager.h" // Network topology (default) diff -r 3e819441bc75 -r 0ad61c84f3c6 examples/emu-udp-echo.cc --- a/examples/emu-udp-echo.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/examples/emu-udp-echo.cc Wed Feb 04 13:08:04 2009 +0100 @@ -65,6 +65,7 @@ #include "ns3/core-module.h" #include "ns3/simulator-module.h" #include "ns3/helper-module.h" +#include "ns3/emu-helper.h" using namespace ns3; diff -r 3e819441bc75 -r 0ad61c84f3c6 src/common/packet-metadata-test.cc --- a/src/common/packet-metadata-test.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/src/common/packet-metadata-test.cc Wed Feb 04 13:08:04 2009 +0100 @@ -178,7 +178,6 @@ class HistoryTrailer : public HistoryTra { public: HistoryTrailer (); - bool IsOk (void) const; static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; diff -r 3e819441bc75 -r 0ad61c84f3c6 src/core/object.h --- a/src/core/object.h Tue Feb 03 06:56:47 2009 -0800 +++ b/src/core/object.h Wed Feb 04 13:08:04 2009 +0100 @@ -403,15 +403,15 @@ Ptr CreateObject (const AttributeList template Ptr -CreateObject (std::string n1 = "", const AttributeValue & v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue & v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue & v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue & v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue & v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue & v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue & v7 = EmptyAttributeValue (), - std::string n8 = "", const AttributeValue & v8 = EmptyAttributeValue (), - std::string n9 = "", const AttributeValue & v9 = EmptyAttributeValue ()) +CreateObject (std::string n1 , const AttributeValue & v1, + std::string n2 , const AttributeValue & v2, + std::string n3 , const AttributeValue & v3, + std::string n4 , const AttributeValue & v4, + std::string n5 , const AttributeValue & v5, + std::string n6 , const AttributeValue & v6, + std::string n7 , const AttributeValue & v7, + std::string n8 , const AttributeValue & v8, + std::string n9 , const AttributeValue & v9) { AttributeList attributes; if (n1 == "") diff -r 3e819441bc75 -r 0ad61c84f3c6 src/devices/point-to-point/point-to-point-channel.cc --- a/src/devices/point-to-point/point-to-point-channel.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/src/devices/point-to-point/point-to-point-channel.cc Wed Feb 04 13:08:04 2009 +0100 @@ -58,7 +58,7 @@ void PointToPointChannel::Attach(Ptr device) { NS_LOG_FUNCTION (this << device); - NS_ASSERT(m_nDevices < N_DEVICES && "Only two devices permitted"); + NS_ASSERT_MSG(m_nDevices < N_DEVICES, "Only two devices permitted"); NS_ASSERT(device != 0); m_link[m_nDevices++].m_src = device; diff -r 3e819441bc75 -r 0ad61c84f3c6 src/devices/wifi/rraa-wifi-manager.cc --- a/src/devices/wifi/rraa-wifi-manager.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/src/devices/wifi/rraa-wifi-manager.cc Wed Feb 04 13:08:04 2009 +0100 @@ -400,7 +400,7 @@ RraaWifiManager::GetThresholds (WifiMode return mode6; } break; } - NS_ASSERT("Thresholds for an unknown mode are asked"); + NS_ASSERT_MSG(false, "Thresholds for an unknown mode are asked"); return ThresholdsItem (); } diff -r 3e819441bc75 -r 0ad61c84f3c6 src/internet-stack/ipv4-l3-protocol.cc --- a/src/internet-stack/ipv4-l3-protocol.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/src/internet-stack/ipv4-l3-protocol.cc Wed Feb 04 13:08:04 2009 +0100 @@ -1068,8 +1068,8 @@ Ipv4L3Protocol::SetUp (uint32_t i) // If interface address and network mask have been set, add a route // to the network of the interface (like e.g. ifconfig does on a // Linux box) - if ((interface->GetAddress ()) != (Ipv4Address ()) - && (interface->GetNetworkMask ()) != (Ipv4Mask ())) + if ( ! interface->GetAddress ().IsEqual (Ipv4Address ()) + && (interface->GetNetworkMask ()) != (Ipv4Mask ())) { AddNetworkRouteTo (interface->GetAddress ().CombineMask (interface->GetNetworkMask ()), interface->GetNetworkMask (), i); diff -r 3e819441bc75 -r 0ad61c84f3c6 src/node/queue.cc --- a/src/node/queue.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/src/node/queue.cc Wed Feb 04 13:08:04 2009 +0100 @@ -84,12 +84,12 @@ Queue::Dequeue (void) if (packet != 0) { + NS_ASSERT (m_nBytes >= packet->GetSize ()); + NS_ASSERT (m_nPackets > 0); + m_nBytes -= packet->GetSize (); m_nPackets--; - NS_ASSERT (m_nBytes >= 0); - NS_ASSERT (m_nPackets >= 0); - NS_LOG_LOGIC("m_traceDequeue (packet)"); m_traceDequeue (packet); diff -r 3e819441bc75 -r 0ad61c84f3c6 src/routing/olsr/olsr-header.cc --- a/src/routing/olsr/olsr-header.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/src/routing/olsr/olsr-header.cc Wed Feb 04 13:08:04 2009 +0100 @@ -303,7 +303,6 @@ MessageHeader::Mid::Deserialize (Buffer: Buffer::Iterator i = start; this->interfaceAddresses.clear (); - NS_ASSERT (messageSize >= 0); NS_ASSERT (messageSize % IPV4_ADDRESS_SIZE == 0); int numAddresses = messageSize / IPV4_ADDRESS_SIZE; diff -r 3e819441bc75 -r 0ad61c84f3c6 src/simulator/time.cc --- a/src/simulator/time.cc Tue Feb 03 06:56:47 2009 -0800 +++ b/src/simulator/time.cc Wed Feb 04 13:08:04 2009 +0100 @@ -32,11 +32,11 @@ namespace ns3 { namespace TimeStepPrecision { -static const uint64_t MS_FACTOR = (uint64_t)pow(10,3); -static const uint64_t US_FACTOR = (uint64_t)pow(10,6); -static const uint64_t NS_FACTOR = (uint64_t)pow(10,9); -static const uint64_t PS_FACTOR = (uint64_t)pow(10,12); -static const uint64_t FS_FACTOR = (uint64_t)pow(10,15); +static const uint64_t MS_FACTOR = 1000LLU; +static const uint64_t US_FACTOR = 1000000LLU; +static const uint64_t NS_FACTOR = 1000000000LLU; +static const uint64_t PS_FACTOR = 1000000000000LLU; +static const uint64_t FS_FACTOR = 1000000000000000LLU; static uint64_t g_tsPrecFactor = NS_FACTOR; static GlobalValue g_precisionDefaultValue ("TimeStepPrecision",