fix optimized builds

This commit is contained in:
Mathieu Lacage
2007-11-06 14:48:31 +01:00
parent cb0eeaeb32
commit d3acfdfa07
4 changed files with 12 additions and 2 deletions

View File

@@ -127,7 +127,8 @@ Ssid::Serialize (Buffer::Iterator i) const
Buffer::Iterator
Ssid::Deserialize (Buffer::Iterator i)
{
uint8_t elementId = i.ReadU8 ();
uint8_t elementId;
elementId = i.ReadU8 ();
NS_ASSERT (elementId == ELEMENT_ID);
m_length = i.ReadU8 ();
NS_ASSERT (m_length <= 32);

View File

@@ -19,6 +19,8 @@
*/
#include "status-code.h"
#include <string>
#include <ostream>
namespace ns3 {

View File

@@ -117,7 +117,8 @@ SupportedRates::Serialize (Buffer::Iterator start) const
Buffer::Iterator
SupportedRates::Deserialize (Buffer::Iterator start)
{
uint8_t elementId = start.ReadU8 ();
uint8_t elementId;
elementId = start.ReadU8 ();
NS_ASSERT (elementId == ELEMENT_ID);
m_nRates = start.ReadU8 ();
NS_ASSERT (m_nRates <= 8);

View File

@@ -1071,6 +1071,12 @@ WifiPhy::CalculatePer (Ptr<const RxEvent> event, NiChanges *ni) const
plcpPreambleDelayUs = m_plcpShortPreambleDelayUs;
headerMode = m_shortPlcpHeaderMode;
break;
default:
NS_ASSERT (false);
// only to quiet compiler. Really stupid.
plcpPreambleDelayUs = 0;
headerMode = m_shortPlcpHeaderMode;
break;
}
Time plcpHeaderStart = (*j).GetTime () + MicroSeconds (plcpPreambleDelayUs);
Time plcpPayloadStart = plcpHeaderStart +