Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1263)

Unified Diff: src/wifi/model/sta-wifi-mac.cc

Issue 333070043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Updated patch for latest changes. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/wifi/model/sta-wifi-mac.cc
===================================================================
--- a/src/wifi/model/sta-wifi-mac.cc
+++ b/src/wifi/model/sta-wifi-mac.cc
@@ -492,11 +492,11 @@
Time delay = MicroSeconds (beacon.GetBeaconIntervalUs () * m_maxMissedBeacons);
RestartBeaconWatchdog (delay);
SetBssid (hdr->GetAddr3 ());
- SupportedRates rates = beacon.GetSupportedRates ();
+ rates = beacon.GetSupportedRates ();
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
{
WifiMode mode = m_phy->GetMode (i);
- if (rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ())))
+ if (rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ()))))
{
m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode);
}
@@ -506,7 +506,7 @@
{
ErpInformation erpInformation = beacon.GetErpInformation ();
isShortPreambleEnabled &= !erpInformation.GetBarkerPreambleMode ();
- if (erpInformation.GetUseProtection () == true)
+ if (erpInformation.GetUseProtection () > 0)
{
m_stationManager->SetUseNonErpProtection (true);
}
@@ -636,10 +636,10 @@
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
{
WifiMode mode = m_phy->GetMode (i);
- if (rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ())))
+ if (rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ()))))
{
m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode);
- if (rates.IsBasicRate (mode.GetDataRate (m_phy->GetChannelWidth ())))
+ if (rates.IsBasicRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ()))))
{
m_stationManager->AddBasicMode (mode);
}
@@ -653,7 +653,7 @@
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
{
WifiMode mode = m_phy->GetMode (i);
- if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ())))
+ if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ()))))
{
isErpAllowed = true;
break;
@@ -719,7 +719,7 @@
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
{
WifiMode mode = m_phy->GetMode (i);
- if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ())))
+ if (mode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM && rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ()))))
{
isErpAllowed = true;
break;
@@ -814,10 +814,10 @@
for (uint8_t i = 0; i < m_phy->GetNModes (); i++)
{
WifiMode mode = m_phy->GetMode (i);
- if (rates.IsSupportedRate (mode.GetDataRate (m_phy->GetChannelWidth ())))
+ if (rates.IsSupportedRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ()))))
{
m_stationManager->AddSupportedMode (hdr->GetAddr2 (), mode);
- if (rates.IsBasicRate (mode.GetDataRate (m_phy->GetChannelWidth ())))
+ if (rates.IsBasicRate (static_cast<uint32_t>(mode.GetDataRate (m_phy->GetChannelWidth ()))))
{
m_stationManager->AddBasicMode (mode);
}
@@ -898,7 +898,7 @@
WifiMode mode = m_phy->GetMode (i);
uint64_t modeDataRate = mode.GetDataRate (m_phy->GetChannelWidth ());
NS_LOG_DEBUG ("Adding supported rate of " << modeDataRate);
- rates.AddSupportedRate (modeDataRate);
+ rates.AddSupportedRate (static_cast<uint32_t>(modeDataRate));
}
return rates;
}

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b