diff --git a/src/devices/wifi/ssid.cc b/src/devices/wifi/ssid.cc index fc427d296..6144adfd7 100644 --- a/src/devices/wifi/ssid.cc +++ b/src/devices/wifi/ssid.cc @@ -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); diff --git a/src/devices/wifi/status-code.cc b/src/devices/wifi/status-code.cc index d594ae4dd..8a0e2c789 100644 --- a/src/devices/wifi/status-code.cc +++ b/src/devices/wifi/status-code.cc @@ -19,6 +19,8 @@ */ #include "status-code.h" +#include +#include namespace ns3 { diff --git a/src/devices/wifi/supported-rates.cc b/src/devices/wifi/supported-rates.cc index 16b2e59ad..a04f8b496 100644 --- a/src/devices/wifi/supported-rates.cc +++ b/src/devices/wifi/supported-rates.cc @@ -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); diff --git a/src/devices/wifi/wifi-phy.cc b/src/devices/wifi/wifi-phy.cc index 4fe0ec271..2ca22000d 100644 --- a/src/devices/wifi/wifi-phy.cc +++ b/src/devices/wifi/wifi-phy.cc @@ -1071,6 +1071,12 @@ WifiPhy::CalculatePer (Ptr 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 +