fix build for gcc 3.4
authorCraig Dowell <craigdo@ee.washington.edu>
Mon, 17 Aug 2009 18:58:54 -0700
changeset 4725 4e068296f09f
parent 4724 10d56d5c0830
child 4726 0488cf67d707
child 4777 7d9a02c787ff
child 5152 f14eff131d13
child 5671 b1fce73037f8
fix build for gcc 3.4
src/devices/wifi/minstrel-wifi-manager.cc
--- a/src/devices/wifi/minstrel-wifi-manager.cc	Fri Aug 14 12:31:13 2009 +0200
+++ b/src/devices/wifi/minstrel-wifi-manager.cc	Mon Aug 17 18:58:54 2009 -0700
@@ -539,8 +539,8 @@
           m_minstrelTable[i].attemptHist += m_minstrelTable[i].numRateAttempt;
           m_minstrelTable[i].prob = tempProb;
 
-          /// ewma probability
-          tempProb = ((tempProb * (100 - m_stations->m_ewmaLevel)) + (m_minstrelTable[i].ewmaProb * m_stations->m_ewmaLevel) )/100;
+          /// ewma probability (cast for gcc 3.4 compatibility)
+          tempProb = static_cast<uint32_t>(((tempProb * (100 - m_stations->m_ewmaLevel)) + (m_minstrelTable[i].ewmaProb * m_stations->m_ewmaLevel) )/100);
 
           m_minstrelTable[i].ewmaProb = tempProb;