fix compilation for optimized builds

This commit is contained in:
Mathieu Lacage
2007-03-29 13:24:22 +02:00
parent 73e6a7aef6
commit 51d7f89ece
2 changed files with 8 additions and 4 deletions

View File

@@ -180,7 +180,8 @@ int main (int argc, char *argv[])
NS_DEBUG_UNCOND("Adding ARP Interface to InternetNode a");
ArpIpv4Interface* arpipv4interfacep = new ArpIpv4Interface(&a, &neta);
uint32_t indexA = (&a)->GetIpv4 ()->AddInterface (arpipv4interfacep);
uint32_t indexA;
indexA = (&a)->GetIpv4 ()->AddInterface (arpipv4interfacep);
NS_DEBUG_UNCOND("Adding Interface " << indexA);
@@ -200,7 +201,8 @@ int main (int argc, char *argv[])
NS_DEBUG_UNCOND("Adding ARP Interface to InternetNode b");
ArpIpv4Interface* arpipv4interfacepb = new ArpIpv4Interface(&b, &netb);
uint32_t indexB = (&b)->GetIpv4 ()->AddInterface (arpipv4interfacepb);
uint32_t indexB;
indexB = (&b)->GetIpv4 ()->AddInterface (arpipv4interfacepb);
NS_DEBUG_UNCOND("Adding Interface " << indexB);

View File

@@ -240,7 +240,8 @@ PointToPointNetDevice::TransmitCompleteEvent (void)
NS_ASSERT(m_txMachineState == BUSY && "Must be BUSY if transmitting");
m_txMachineState = GAP;
Packet p;
bool found = m_queue->Dequeue (p);
bool found;
found = m_queue->Dequeue (p);
NS_ASSERT(found && "Packet must be on queue if transmitted");
NS_DEBUG ("PointToPointNetDevice::TransmitCompleteEvent (): Pkt UID is " <<
p.GetUid () << ")");
@@ -275,7 +276,8 @@ PointToPointNetDevice::TransmitReadyEvent (void)
else
{
Packet p;
bool found = m_queue->Peek (p);
bool found;
found = m_queue->Peek (p);
NS_ASSERT(found && "IsEmpty false but no Packet on queue?");
TransmitStart (p);
}