Bug 1157 - opt build ?address? set but not used, and others in application module
--- a/src/applications/model/packet-sink.cc Sat May 14 04:32:10 2011 -0400
+++ b/src/applications/model/packet-sink.cc Sat May 14 04:40:49 2011 -0400
@@ -164,10 +164,9 @@
}
if (InetSocketAddress::IsMatchingType (from))
{
- InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
m_totalRx += packet->GetSize();
NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
- address.GetIpv4() << " [" << address << "]"
+ address.GetIpv4() << " [" << InetSocketAddress::ConvertFrom (from) << "]"
<< " total Rx " << m_totalRx);
}
m_rxTrace (packet, from);
--- a/src/applications/model/udp-echo-client.cc Sat May 14 04:32:10 2011 -0400
+++ b/src/applications/model/udp-echo-client.cc Sat May 14 04:40:49 2011 -0400
@@ -299,9 +299,8 @@
{
if (InetSocketAddress::IsMatchingType (from))
{
- InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
- address.GetIpv4());
+ InetSocketAddress::ConvertFrom (from).GetIpv4());
}
}
}
--- a/src/applications/model/udp-echo-server.cc Sat May 14 04:32:10 2011 -0400
+++ b/src/applications/model/udp-echo-server.cc Sat May 14 04:40:49 2011 -0400
@@ -117,9 +117,8 @@
{
if (InetSocketAddress::IsMatchingType (from))
{
- InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
- address.GetIpv4());
+ InetSocketAddress::ConvertFrom (from).GetIpv4());
packet->RemoveAllPacketTags ();
packet->RemoveAllByteTags ();
--- a/src/applications/model/udp-server.cc Sat May 14 04:32:10 2011 -0400
+++ b/src/applications/model/udp-server.cc Sat May 14 04:40:49 2011 -0400
@@ -146,7 +146,6 @@
{
SeqTsHeader seqTs;
packet->RemoveHeader (seqTs);
- Time delay = Simulator::Now () - seqTs.GetTs ();
uint32_t currentSequenceNumber = seqTs.GetSeq ();
NS_LOG_INFO ("TraceDelay: RX " << packet->GetSize () <<
" bytes from "<< InetSocketAddress::ConvertFrom(from).GetIpv4 () <<
@@ -154,7 +153,7 @@
" Uid: " << packet->GetUid () <<
" TXtime: " << seqTs.GetTs () <<
" RXtime: " << Simulator::Now () <<
- " Delay: " << delay) ;
+ " Delay: " << Simulator::Now () - seqTs.GetTs ()) ;
m_lossCounter.NotifyReceived (currentSequenceNumber);
m_received++;
--- a/src/applications/model/v4ping.cc Sat May 14 04:32:10 2011 -0400
+++ b/src/applications/model/v4ping.cc Sat May 14 04:40:49 2011 -0400
@@ -241,6 +241,9 @@
InetSocketAddress dst = InetSocketAddress (m_remote, 0);
status = m_socket->Connect (dst);
NS_ASSERT (status != -1);
+ //cast status to void, to suppress 'status' set but not used compiler warning
+ //in optimized builds
+ (void) status;
Send ();
}