From ab369ae67853e035a11722bf7ef9a0ce6f2d313f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Mon, 21 May 2018 22:02:18 +0200 Subject: [PATCH] wifi: Fix Visual Studio warnings in MinstrelWifiManager --- src/wifi/model/minstrel-wifi-manager.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wifi/model/minstrel-wifi-manager.cc b/src/wifi/model/minstrel-wifi-manager.cc index 5e1d90329..44c2ac6e8 100644 --- a/src/wifi/model/minstrel-wifi-manager.cc +++ b/src/wifi/model/minstrel-wifi-manager.cc @@ -537,7 +537,7 @@ MinstrelWifiManager::UpdateStats (MinstrelWifiRemoteStation *station) NS_LOG_DEBUG ("Currently using rate: " << +station->m_txrate << " (" << GetSupported (station, station->m_txrate) << ")"); Time txTime; - uint8_t tempProb; + uint32_t tempProb; NS_LOG_DEBUG ("Index-Rate\t\tAttempt\tSuccess"); for (uint8_t i = 0; i < station->m_nModes; i++) @@ -576,14 +576,13 @@ MinstrelWifiManager::UpdateStats (MinstrelWifiRemoteStation *station) else { //ewma probability (cast for gcc 3.4 compatibility) - tempProb = static_cast (((tempProb * (100 - m_ewmaLevel)) + (station->m_minstrelTable[i].ewmaProb * m_ewmaLevel) ) / 100); + tempProb = ((tempProb * (100 - m_ewmaLevel)) + (station->m_minstrelTable[i].ewmaProb * m_ewmaLevel) ) / 100; station->m_minstrelTable[i].ewmaProb = tempProb; } //calculating throughput - station->m_minstrelTable[i].throughput = tempProb * (1000000 / txTime.GetMicroSeconds ()); - + station->m_minstrelTable[i].throughput = tempProb * static_cast ((1000000 / txTime.GetMicroSeconds ())); } else {