fix optimized build

This commit is contained in:
Tom Henderson
2008-05-27 06:03:48 -07:00
parent 6af434b9f9
commit 4182edbc93
5 changed files with 12 additions and 6 deletions

View File

@@ -106,7 +106,8 @@ void PacketSink::HandleRead (Ptr<Socket> socket)
while (packet = socket->Recv ())
{
SocketRxAddressTag tag;
bool found = packet->FindFirstMatchingTag (tag);
bool found;
found = packet->FindFirstMatchingTag (tag);
NS_ASSERT (found);
Address from = tag.GetAddress ();
// XXX packet->RemoveTag (tag);

View File

@@ -153,7 +153,8 @@ UdpEchoClient::HandleRead (Ptr<Socket> socket)
while (packet = socket->Recv ())
{
SocketRxAddressTag tag;
bool found = packet->FindFirstMatchingTag (tag);
bool found;
found = packet->FindFirstMatchingTag (tag);
NS_ASSERT (found);
Address from = tag.GetAddress ();
// XXX packet->RemoveTag (tag);

View File

@@ -98,7 +98,8 @@ UdpEchoServer::HandleRead (Ptr<Socket> socket)
while (packet = socket->Recv ())
{
SocketRxAddressTag tag;
bool found = packet->FindFirstMatchingTag (tag);
bool found;
found = packet->FindFirstMatchingTag (tag);
NS_ASSERT (found);
Address from = tag.GetAddress ();
// XXX packet->RemoveTag (tag);

View File

@@ -530,14 +530,16 @@ void UdpSocketImplTest::ReceivePacket2 (Ptr<Socket> socket, Ptr<Packet> packet,
void UdpSocketImplTest::ReceivePkt (Ptr<Socket> socket)
{
uint32_t availableData = socket->GetRxAvailable ();
uint32_t availableData;
availableData = socket->GetRxAvailable ();
m_receivedPacket = socket->Recv (std::numeric_limits<uint32_t>::max(), 0);
NS_ASSERT (availableData == m_receivedPacket->GetSize ());
}
void UdpSocketImplTest::ReceivePkt2 (Ptr<Socket> socket)
{
uint32_t availableData = socket->GetRxAvailable ();
uint32_t availableData;
availableData = socket->GetRxAvailable ();
m_receivedPacket2 = socket->Recv (std::numeric_limits<uint32_t>::max(), 0);
NS_ASSERT (availableData == m_receivedPacket2->GetSize ());
}

View File

@@ -312,7 +312,8 @@ AgentImpl::RecvOlsr (Ptr<Socket> socket)
receivedPacket = socket->Recv ();
SocketRxAddressTag tag;
bool found = receivedPacket->FindFirstMatchingTag (tag);
bool found;
found = receivedPacket->FindFirstMatchingTag (tag);
NS_ASSERT (found);
Address sourceAddress = tag.GetAddress ();