From b40d64f702fca56437a317ca40a02bedb1fc12b2 Mon Sep 17 00:00:00 2001 From: Robert Ammon Date: Sat, 12 May 2018 22:09:39 +0200 Subject: [PATCH] wifi: Use casts to eliminate Visual Studio compiler warnings --- src/wifi/model/ap-wifi-mac.cc | 2 +- src/wifi/model/dcf-manager.cc | 4 ++-- src/wifi/model/edca-parameter-set.cc | 16 ++++++++-------- src/wifi/model/ideal-wifi-manager.cc | 8 ++++---- src/wifi/model/mgt-headers.cc | 2 +- src/wifi/model/mpdu-aggregator.cc | 6 +++--- src/wifi/model/msdu-aggregator.cc | 2 +- src/wifi/model/regular-wifi-mac.cc | 6 +++--- src/wifi/model/rraa-wifi-manager.cc | 2 +- src/wifi/model/rrpaa-wifi-manager.cc | 2 +- src/wifi/model/wifi-mac-header.cc | 2 +- src/wifi/model/wifi-mode.cc | 4 ++-- src/wifi/model/wifi-net-device.cc | 2 +- src/wifi/model/wifi-phy-tag.cc | 2 +- src/wifi/model/wifi-phy.cc | 18 +++++++++--------- src/wifi/model/wifi-radio-energy-model.cc | 12 ++++++------ src/wifi/model/wifi-remote-station-manager.cc | 12 ++++++------ src/wifi/model/wifi-utils.cc | 2 +- 18 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/wifi/model/ap-wifi-mac.cc b/src/wifi/model/ap-wifi-mac.cc index dc2ef0c3d..47364ec71 100644 --- a/src/wifi/model/ap-wifi-mac.cc +++ b/src/wifi/model/ap-wifi-mac.cc @@ -583,7 +583,7 @@ ApWifiMac::GetHtOperation (void) const } } } - operation.SetRxHighestSupportedDataRate (maxSupportedRate / 1e6); //in Mbit/s + operation.SetRxHighestSupportedDataRate (static_cast (maxSupportedRate / 1e6)); //in Mbit/s operation.SetTxMcsSetDefined (nMcs > 0); operation.SetTxMaxNSpatialStreams (maxSpatialStream); //To be filled in once supported diff --git a/src/wifi/model/dcf-manager.cc b/src/wifi/model/dcf-manager.cc index 576b21f14..95f312738 100644 --- a/src/wifi/model/dcf-manager.cc +++ b/src/wifi/model/dcf-manager.cc @@ -173,7 +173,7 @@ void DcfManager::SetSlot (Time slotTime) { NS_LOG_FUNCTION (this << slotTime); - m_slotTimeUs = slotTime.GetMicroSeconds (); + m_slotTimeUs = static_cast (slotTime.GetMicroSeconds ()); } void @@ -448,7 +448,7 @@ DcfManager::UpdateBackoff (void) Time backoffStart = GetBackoffStartFor (state); if (backoffStart <= Simulator::Now ()) { - uint32_t nus = (Simulator::Now () - backoffStart).GetMicroSeconds (); + uint32_t nus = static_cast ((Simulator::Now () - backoffStart).GetMicroSeconds ()); uint32_t nIntSlots = nus / m_slotTimeUs; /* * EDCA behaves slightly different to DCA. For EDCA we diff --git a/src/wifi/model/edca-parameter-set.cc b/src/wifi/model/edca-parameter-set.cc index 5accc10ce..7e3e760fa 100644 --- a/src/wifi/model/edca-parameter-set.cc +++ b/src/wifi/model/edca-parameter-set.cc @@ -73,14 +73,14 @@ EdcaParameterSet::SetBeAci (uint8_t aci) void EdcaParameterSet::SetBeCWmin (uint32_t cwMin) { - uint8_t ECWmin = log2 (cwMin + 1); + uint8_t ECWmin = static_cast (log2 (cwMin + 1)); m_acBE |= (ECWmin & 0x0f) << 8; } void EdcaParameterSet::SetBeCWmax (uint32_t cwMax) { - uint8_t ECWmax = log2 (cwMax + 1); + uint8_t ECWmax = static_cast (log2 (cwMax + 1)); m_acBE |= (ECWmax & 0x0f) << 12; } @@ -105,14 +105,14 @@ EdcaParameterSet::SetBkAci (uint8_t aci) void EdcaParameterSet::SetBkCWmin (uint32_t cwMin) { - uint8_t ECWmin = log2 (cwMin + 1); + uint8_t ECWmin = static_cast (log2 (cwMin + 1)); m_acBK |= (ECWmin & 0x0f) << 8; } void EdcaParameterSet::SetBkCWmax (uint32_t cwMax) { - uint8_t ECWmax = log2 (cwMax + 1); + uint8_t ECWmax = static_cast (log2 (cwMax + 1)); m_acBK |= (ECWmax & 0x0f) << 12; } @@ -137,14 +137,14 @@ EdcaParameterSet::SetViAci (uint8_t aci) void EdcaParameterSet::SetViCWmin (uint32_t cwMin) { - uint8_t ECWmin = log2 (cwMin + 1); + uint8_t ECWmin = static_cast (log2 (cwMin + 1)); m_acVI |= (ECWmin & 0x0f) << 8; } void EdcaParameterSet::SetViCWmax (uint32_t cwMax) { - uint8_t ECWmax = log2 (cwMax + 1); + uint8_t ECWmax = static_cast (log2 (cwMax + 1)); m_acVI |= (ECWmax & 0x0f) << 12; } @@ -169,14 +169,14 @@ EdcaParameterSet::SetVoAci (uint8_t aci) void EdcaParameterSet::SetVoCWmin (uint32_t cwMin) { - uint8_t ECWmin = log2 (cwMin + 1); + uint8_t ECWmin = static_cast (log2 (cwMin + 1)); m_acVO |= (ECWmin & 0x0f) << 8; } void EdcaParameterSet::SetVoCWmax (uint32_t cwMax) { - uint8_t ECWmax = log2 (cwMax + 1); + uint8_t ECWmax = static_cast (log2 (cwMax + 1)); m_acVO |= (ECWmax & 0x0f) << 12; } diff --git a/src/wifi/model/ideal-wifi-manager.cc b/src/wifi/model/ideal-wifi-manager.cc index b6d43baf6..0cb76df21 100644 --- a/src/wifi/model/ideal-wifi-manager.cc +++ b/src/wifi/model/ideal-wifi-manager.cc @@ -151,7 +151,7 @@ IdealWifiManager::DoInitialize () } else { - guardInterval = GetPhy ()->GetGuardInterval ().GetNanoSeconds (); + guardInterval = static_cast (GetPhy ()->GetGuardInterval ().GetNanoSeconds ()); } txVector.SetGuardInterval (guardInterval); for (uint8_t k = 1; k <= GetPhy ()->GetMaxSupportedTxSpatialStreams (); k++) @@ -321,7 +321,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st) txVector.SetMode (mode); if (mode.GetModulationClass () == WIFI_MOD_CLASS_HT) { - guardInterval = std::max (GetShortGuardInterval (station) ? 400 : 800, GetPhy ()->GetShortGuardInterval () ? 400 : 800); + guardInterval = static_cast (std::max (GetShortGuardInterval (station) ? 400 : 800, GetPhy ()->GetShortGuardInterval () ? 400 : 800)); txVector.SetGuardInterval (guardInterval); // If the node and peer are both VHT capable, only search VHT modes if (HasVhtSupported () && GetVhtSupported (station)) @@ -365,7 +365,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st) } else if (mode.GetModulationClass () == WIFI_MOD_CLASS_VHT) { - guardInterval = std::max (GetShortGuardInterval (station) ? 400 : 800, GetPhy ()->GetShortGuardInterval () ? 400 : 800); + guardInterval = static_cast (std::max (GetShortGuardInterval (station) ? 400 : 800, GetPhy ()->GetShortGuardInterval () ? 400 : 800)); txVector.SetGuardInterval (guardInterval); // If the node and peer are both HE capable, only search HE modes if (HasHeSupported () && GetHeSupported (station)) @@ -488,7 +488,7 @@ IdealWifiManager::DoGetDataTxVector (WifiRemoteStation *st) } else { - guardInterval = std::max (GetShortGuardInterval (station) ? 400 : 800, GetPhy ()->GetShortGuardInterval () ? 400 : 800); + guardInterval = static_cast (std::max (GetShortGuardInterval (station) ? 400 : 800, GetPhy ()->GetShortGuardInterval () ? 400 : 800)); } if (m_currentRate != maxMode.GetDataRate (channelWidth, guardInterval, selectedNss)) { diff --git a/src/wifi/model/mgt-headers.cc b/src/wifi/model/mgt-headers.cc index d7628d5aa..7387780a5 100644 --- a/src/wifi/model/mgt-headers.cc +++ b/src/wifi/model/mgt-headers.cc @@ -441,7 +441,7 @@ MgtProbeResponseHeader::Serialize (Buffer::Iterator start) const //ibss parameter set Buffer::Iterator i = start; i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ()); - i.WriteHtolsbU16 (m_beaconInterval / 1024); + i.WriteHtolsbU16 (static_cast (m_beaconInterval / 1024)); i = m_capability.Serialize (i); i = m_ssid.Serialize (i); i = m_rates.Serialize (i); diff --git a/src/wifi/model/mpdu-aggregator.cc b/src/wifi/model/mpdu-aggregator.cc index 4bb668c94..027005292 100644 --- a/src/wifi/model/mpdu-aggregator.cc +++ b/src/wifi/model/mpdu-aggregator.cc @@ -77,7 +77,7 @@ MpduAggregator::Aggregate (Ptr packet, Ptr aggregatedPacke Ptr pad = Create (padding); aggregatedPacket->AddAtEnd (pad); } - currentHdr.SetLength (packet->GetSize ()); + currentHdr.SetLength (static_cast (packet->GetSize ())); currentPacket = packet->Copy (); currentPacket->AddHeader (currentHdr); @@ -102,7 +102,7 @@ MpduAggregator::AggregateSingleMpdu (Ptr packet, Ptr aggre } currentHdr.SetEof (1); - currentHdr.SetLength (packet->GetSize ()); + currentHdr.SetLength (static_cast (packet->GetSize ())); currentPacket = packet->Copy (); currentPacket->AddHeader (currentHdr); @@ -117,7 +117,7 @@ MpduAggregator::AddHeaderAndPad (Ptr packet, bool last, bool isSingleMpd //This is called to prepare packets from the aggregate queue to be sent so no need to check total size since it has already been //done before when deciding how many packets to add to the queue - currentHdr.SetLength (packet->GetSize ()); + currentHdr.SetLength (static_cast (packet->GetSize ())); if (isSingleMpdu) { currentHdr.SetEof (1); diff --git a/src/wifi/model/msdu-aggregator.cc b/src/wifi/model/msdu-aggregator.cc index db12d0b8f..aa01d6e18 100644 --- a/src/wifi/model/msdu-aggregator.cc +++ b/src/wifi/model/msdu-aggregator.cc @@ -80,7 +80,7 @@ MsduAggregator::Aggregate (Ptr packet, Ptr aggregatedPacke } currentHdr.SetDestinationAddr (dest); currentHdr.SetSourceAddr (src); - currentHdr.SetLength (packet->GetSize ()); + currentHdr.SetLength (static_cast (packet->GetSize ())); currentPacket = packet->Copy (); currentPacket->AddHeader (currentHdr); diff --git a/src/wifi/model/regular-wifi-mac.cc b/src/wifi/model/regular-wifi-mac.cc index 8291ce77a..3a679b1ec 100644 --- a/src/wifi/model/regular-wifi-mac.cc +++ b/src/wifi/model/regular-wifi-mac.cc @@ -204,7 +204,7 @@ RegularWifiMac::GetHtCapabilities (void) const NS_LOG_DEBUG ("Updating maxSupportedRate to " << maxSupportedRate); } } - capabilities.SetRxHighestSupportedDataRate (maxSupportedRate / 1e6); //in Mbit/s + capabilities.SetRxHighestSupportedDataRate (static_cast (maxSupportedRate / 1e6)); //in Mbit/s capabilities.SetTxMcsSetDefined (m_phy->GetNMcs () > 0); capabilities.SetTxMaxNSpatialStreams (m_phy->GetMaxSupportedTxSpatialStreams ()); //we do not support unequal modulations @@ -271,8 +271,8 @@ RegularWifiMac::GetVhtCapabilities (void) const NS_LOG_DEBUG ("Updating maxSupportedRateLGI to " << maxSupportedRateLGI); } } - capabilities.SetRxHighestSupportedLgiDataRate (maxSupportedRateLGI / 1e6); //in Mbit/s - capabilities.SetTxHighestSupportedLgiDataRate (maxSupportedRateLGI / 1e6); //in Mbit/s + capabilities.SetRxHighestSupportedLgiDataRate (static_cast (maxSupportedRateLGI / 1e6)); //in Mbit/s + capabilities.SetTxHighestSupportedLgiDataRate (static_cast (maxSupportedRateLGI / 1e6)); //in Mbit/s //To be filled in once supported capabilities.SetRxStbc (0); capabilities.SetTxStbc (0); diff --git a/src/wifi/model/rraa-wifi-manager.cc b/src/wifi/model/rraa-wifi-manager.cc index 4cc952e39..e3bf279e6 100644 --- a/src/wifi/model/rraa-wifi-manager.cc +++ b/src/wifi/model/rraa-wifi-manager.cc @@ -249,7 +249,7 @@ RraaWifiManager::InitThresholds (RraaWifiRemoteStation *station) mtl = 1; } WifiRraaThresholds th; - th.m_ewnd = ceil (m_tau / totalTxTime.GetSeconds ()); + th.m_ewnd = static_cast (ceil (m_tau / totalTxTime.GetSeconds ())); th.m_ori = ori; th.m_mtl = mtl; station->m_thresholds.push_back (std::make_pair (th, mode)); diff --git a/src/wifi/model/rrpaa-wifi-manager.cc b/src/wifi/model/rrpaa-wifi-manager.cc index a5b7f5e50..a2dbbb038 100644 --- a/src/wifi/model/rrpaa-wifi-manager.cc +++ b/src/wifi/model/rrpaa-wifi-manager.cc @@ -296,7 +296,7 @@ RrpaaWifiManager::InitThresholds (RrpaaWifiRemoteStation *station) mtl = nextMtl; } WifiRrpaaThresholds th; - th.m_ewnd = ceil (m_tau / totalTxTime.GetSeconds ()); + th.m_ewnd = static_cast (ceil (m_tau / totalTxTime.GetSeconds ())); th.m_ori = ori; th.m_mtl = mtl; station->m_thresholds.push_back (std::make_pair (th, mode)); diff --git a/src/wifi/model/wifi-mac-header.cc b/src/wifi/model/wifi-mac-header.cc index 8e2217d23..f7a1ca4a6 100644 --- a/src/wifi/model/wifi-mac-header.cc +++ b/src/wifi/model/wifi-mac-header.cc @@ -257,7 +257,7 @@ WifiMacHeader::SetType (WifiMacType type) void WifiMacHeader::SetDuration (Time duration) { - int64_t duration_us = ceil (static_cast (duration.GetNanoSeconds ()) / 1000); + int64_t duration_us = static_cast (ceil (static_cast (duration.GetNanoSeconds ()) / 1000)); NS_ASSERT (duration_us >= 0 && duration_us <= 0x7fff); m_duration = static_cast (duration_us); } diff --git a/src/wifi/model/wifi-mode.cc b/src/wifi/model/wifi-mode.cc index 5777b8396..6d5513de8 100644 --- a/src/wifi/model/wifi-mode.cc +++ b/src/wifi/model/wifi-mode.cc @@ -162,7 +162,7 @@ WifiMode::GetDataRate (uint16_t channelWidth, uint16_t guardInterval, uint8_t ns uint16_t usableSubCarriers = 0; double symbolRate = 0; double codingRate = 0; - uint16_t numberOfBitsPerSubcarrier = log2 (GetConstellationSize ()); + uint16_t numberOfBitsPerSubcarrier = static_cast (log2 (GetConstellationSize ())); if (item->modClass == WIFI_MOD_CLASS_DSSS) { dataRate = ((11000000 / 11) * numberOfBitsPerSubcarrier); @@ -799,7 +799,7 @@ WifiModeFactory::AllocateUid (std::string uniqueUid) } j++; } - uint32_t uid = m_itemList.size (); + uint32_t uid = static_cast (m_itemList.size ()); m_itemList.push_back (WifiModeItem ()); return uid; } diff --git a/src/wifi/model/wifi-net-device.cc b/src/wifi/model/wifi-net-device.cc index 541f12244..579d6238f 100644 --- a/src/wifi/model/wifi-net-device.cc +++ b/src/wifi/model/wifi-net-device.cc @@ -498,7 +498,7 @@ WifiNetDevice::SelectQueue (Ptr item) const // if the admission control were implemented, here we should check whether // the access category assigned to the packet should be downgraded - return QosUtilsMapTidToAc (priority); + return static_cast (QosUtilsMapTidToAc (priority)); } } //namespace ns3 diff --git a/src/wifi/model/wifi-phy-tag.cc b/src/wifi/model/wifi-phy-tag.cc index 5f06860b8..079a2f121 100644 --- a/src/wifi/model/wifi-phy-tag.cc +++ b/src/wifi/model/wifi-phy-tag.cc @@ -47,7 +47,7 @@ void WifiPhyTag::Serialize (TagBuffer i) const { i.Write ((uint8_t *)&m_wifiTxVector, sizeof (WifiTxVector)); - i.WriteU16 (m_mpduType); + i.WriteU16 (static_cast (m_mpduType)); i.WriteU8 (m_frameComplete); } diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 8d615c04d..2f81ca72e 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1311,7 +1311,7 @@ WifiPhy::GetMaxSupportedRxSpatialStreams (void) const uint8_t WifiPhy::GetNBssMembershipSelectors (void) const { - return m_bssMembershipSelectorSet.size (); + return static_cast (m_bssMembershipSelectorSet.size ()); } uint8_t @@ -2157,11 +2157,11 @@ WifiPhy::GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t freq //Add signal extension for ERP PHY if (payloadMode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM) { - return FemtoSeconds (numSymbols * symbolDuration.GetFemtoSeconds ()) + MicroSeconds (6); + return FemtoSeconds (static_cast (numSymbols * symbolDuration.GetFemtoSeconds ())) + MicroSeconds (6); } else { - return FemtoSeconds (numSymbols * symbolDuration.GetFemtoSeconds ()); + return FemtoSeconds (static_cast (numSymbols * symbolDuration.GetFemtoSeconds ())); } } case WIFI_MOD_CLASS_HT: @@ -2171,11 +2171,11 @@ WifiPhy::GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t freq && ((mpdutype == NORMAL_MPDU && preamble != WIFI_PREAMBLE_NONE) || (mpdutype == LAST_MPDU_IN_AGGREGATE && preamble == WIFI_PREAMBLE_NONE))) //at 2.4 GHz { - return FemtoSeconds (numSymbols * symbolDuration.GetFemtoSeconds ()) + MicroSeconds (6); + return FemtoSeconds (static_cast (numSymbols * symbolDuration.GetFemtoSeconds ())) + MicroSeconds (6); } else //at 5 GHz { - return FemtoSeconds (numSymbols * symbolDuration.GetFemtoSeconds ()); + return FemtoSeconds (static_cast (numSymbols * symbolDuration.GetFemtoSeconds ())); } } case WIFI_MOD_CLASS_HE: @@ -2184,11 +2184,11 @@ WifiPhy::GetPayloadDuration (uint32_t size, WifiTxVector txVector, uint16_t freq && ((mpdutype == NORMAL_MPDU && preamble != WIFI_PREAMBLE_NONE) || (mpdutype == LAST_MPDU_IN_AGGREGATE && preamble == WIFI_PREAMBLE_NONE))) //at 2.4 GHz { - return FemtoSeconds (numSymbols * symbolDuration.GetFemtoSeconds ()) + MicroSeconds (6); + return FemtoSeconds (static_cast (numSymbols * symbolDuration.GetFemtoSeconds ())) + MicroSeconds (6); } else //at 5 GHz { - return FemtoSeconds (numSymbols * symbolDuration.GetFemtoSeconds ()); + return FemtoSeconds (static_cast (numSymbols * symbolDuration.GetFemtoSeconds ())); } } case WIFI_MOD_CLASS_DSSS: @@ -3494,7 +3494,7 @@ WifiPhy::IsMcsSupported (WifiMode mcs) const uint8_t WifiPhy::GetNModes (void) const { - return m_deviceRateSet.size (); + return static_cast (m_deviceRateSet.size ()); } WifiMode @@ -3506,7 +3506,7 @@ WifiPhy::GetMode (uint8_t mode) const uint8_t WifiPhy::GetNMcs (void) const { - return m_deviceMcsSet.size (); + return static_cast (m_deviceMcsSet.size ()); } WifiMode diff --git a/src/wifi/model/wifi-radio-energy-model.cc b/src/wifi/model/wifi-radio-energy-model.cc index 5b07ae1c2..b93df457b 100644 --- a/src/wifi/model/wifi-radio-energy-model.cc +++ b/src/wifi/model/wifi-radio-energy-model.cc @@ -302,22 +302,22 @@ WifiRadioEnergyModel::GetMaximumTimeInState (int state) const switch (state) { case WifiPhyState::IDLE: - remainingTime = NanoSeconds (1e9 * (remainingEnergy / (m_idleCurrentA * supplyVoltage))); + remainingTime = NanoSeconds (static_cast (1e9 * (remainingEnergy / (m_idleCurrentA * supplyVoltage)))); break; case WifiPhyState::CCA_BUSY: - remainingTime = NanoSeconds (1e9 * (remainingEnergy / (m_ccaBusyCurrentA * supplyVoltage))); + remainingTime = NanoSeconds (static_cast (1e9 * (remainingEnergy / (m_ccaBusyCurrentA * supplyVoltage)))); break; case WifiPhyState::TX: - remainingTime = NanoSeconds (1e9 * (remainingEnergy / (m_txCurrentA * supplyVoltage))); + remainingTime = NanoSeconds (static_cast (1e9 * (remainingEnergy / (m_txCurrentA * supplyVoltage)))); break; case WifiPhyState::RX: - remainingTime = NanoSeconds (1e9 * (remainingEnergy / (m_rxCurrentA * supplyVoltage))); + remainingTime = NanoSeconds (static_cast (1e9 * (remainingEnergy / (m_rxCurrentA * supplyVoltage)))); break; case WifiPhyState::SWITCHING: - remainingTime = NanoSeconds (1e9 * (remainingEnergy / (m_switchingCurrentA * supplyVoltage))); + remainingTime = NanoSeconds (static_cast (1e9 * (remainingEnergy / (m_switchingCurrentA * supplyVoltage)))); break; case WifiPhyState::SLEEP: - remainingTime = NanoSeconds (1e9 * (remainingEnergy / (m_sleepCurrentA * supplyVoltage))); + remainingTime = NanoSeconds (static_cast (1e9 * (remainingEnergy / (m_sleepCurrentA * supplyVoltage)))); break; default: NS_FATAL_ERROR ("WifiRadioEnergyModel: undefined radio state " << state); diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index f2a917d3e..6eb9e7c25 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -1615,7 +1615,7 @@ WifiRemoteStationManager::LookupState (Mac48Address address) const state->m_operationalMcsSet.push_back (GetDefaultMcs ()); state->m_channelWidth = m_wifiPhy->GetChannelWidth (); state->m_shortGuardInterval = m_wifiPhy->GetShortGuardInterval (); - state->m_guardInterval = m_wifiPhy->GetGuardInterval ().GetNanoSeconds (); + state->m_guardInterval = static_cast (m_wifiPhy->GetGuardInterval ().GetNanoSeconds ()); state->m_greenfield = m_wifiPhy->GetGreenfield (); state->m_streams = 1; state->m_ness = 0; @@ -1861,7 +1861,7 @@ WifiRemoteStationManager::AddBasicMode (WifiMode mode) uint8_t WifiRemoteStationManager::GetNBasicModes (void) const { - return m_bssBasicRateSet.size (); + return static_cast (m_bssBasicRateSet.size ()); } WifiMode @@ -1928,7 +1928,7 @@ WifiRemoteStationManager::AddBasicMcs (WifiMode mcs) uint8_t WifiRemoteStationManager::GetNBasicMcs (void) const { - return m_bssBasicMcsSet.size (); + return static_cast (m_bssBasicMcsSet.size ()); } WifiMode @@ -2097,7 +2097,7 @@ WifiRemoteStationManager::GetMac (void) const uint8_t WifiRemoteStationManager::GetNSupported (const WifiRemoteStation *station) const { - return station->m_state->m_operationalRateSet.size (); + return static_cast (station->m_state->m_operationalRateSet.size ()); } bool @@ -2127,7 +2127,7 @@ WifiRemoteStationManager::GetHeSupported (const WifiRemoteStation *station) cons uint8_t WifiRemoteStationManager::GetNMcsSupported (const WifiRemoteStation *station) const { - return station->m_state->m_operationalMcsSet.size (); + return static_cast (station->m_state->m_operationalMcsSet.size ()); } uint32_t @@ -2166,7 +2166,7 @@ WifiRemoteStationManager::GetNumberOfSupportedStreams (Mac48Address address) con uint8_t WifiRemoteStationManager::GetNMcsSupported (Mac48Address address) const { - return LookupState (address)->m_operationalMcsSet.size (); + return static_cast (LookupState (address)->m_operationalMcsSet.size ()); } bool diff --git a/src/wifi/model/wifi-utils.cc b/src/wifi/model/wifi-utils.cc index a01db9cf5..8e8156d7e 100644 --- a/src/wifi/model/wifi-utils.cc +++ b/src/wifi/model/wifi-utils.cc @@ -87,7 +87,7 @@ ConvertGuardIntervalToNanoSeconds (WifiMode mode, bool htShortGuardInterval, Tim uint16_t gi; if (mode.GetModulationClass () == WIFI_MOD_CLASS_HE) { - gi = heGuardInterval.GetNanoSeconds (); + gi = static_cast (heGuardInterval.GetNanoSeconds ()); } else if (mode.GetModulationClass () == WIFI_MOD_CLASS_HT || mode.GetModulationClass () == WIFI_MOD_CLASS_VHT) {