fix compilation warnings in optimized mode
authorNicola Baldo <nbaldo@cttc.es>
Tue, 08 Jan 2013 12:57:51 +0100
changeset 9617 9e8cc31936f8
parent 9616 71edcc314291
child 9618 0ea7f5ea874a
fix compilation warnings in optimized mode
src/lte/helper/lte-helper.cc
src/lte/model/lte-enb-mac.cc
src/lte/model/lte-spectrum-phy.cc
--- a/src/lte/helper/lte-helper.cc	Tue Jan 08 13:45:31 2013 +0100
+++ b/src/lte/helper/lte-helper.cc	Tue Jan 08 12:57:51 2013 +0100
@@ -990,7 +990,7 @@
 FindImsiForEnb (std::string path, uint16_t rnti)
 {
   NS_LOG_FUNCTION (path << rnti);
-  uint64_t imsi;
+  uint64_t imsi = 0;
   if (path.find ("/DlPhyTransmission"))
     {
       // /NodeList/0/DeviceList/0/LteEnbPhy/DlPhyTransmission/LteEnbRrc/UeMap/1
@@ -1001,7 +1001,7 @@
       imsi = FindImsiFromEnbRlcPath (p);
       NS_LOG_LOGIC ("FindImsiForEnb[Tx]: " << path << ", " << rnti << ", " << imsi);
     }
-  else if (path.find ("/UIlPhyReception"))
+  else if (path.find ("/UlPhyReception"))
     {
       std::string p = path.substr (0, path.find ("/LteUePhy"));
       imsi = FindImsiFromLteNetDevice (p);
@@ -1015,14 +1015,14 @@
 FindImsiForUe (std::string path, uint16_t rnti)
 {
   NS_LOG_FUNCTION (path << rnti);
-  uint64_t imsi;
-  if (path.find ("/UIlPhyTransmission"))
+  uint64_t imsi = 0;
+  if (path.find ("/UlPhyTransmission"))
     {
       std::string p = path.substr (0, path.find ("/LteUePhy"));
       imsi = FindImsiFromLteNetDevice (p);
       NS_LOG_LOGIC ("FindImsiForUe[Tx]: " << path << ", " << rnti << ", " << imsi);
     }
-  else if (path.find ("/DIlPhyReception"))
+  else if (path.find ("/DlPhyReception"))
     {
       // /NodeList/0/DeviceList/0/LteEnbPhy/LteSpectrumPhy
       std::ostringstream oss;
--- a/src/lte/model/lte-enb-mac.cc	Tue Jan 08 13:45:31 2013 +0100
+++ b/src/lte/model/lte-enb-mac.cc	Tue Jan 08 12:57:51 2013 +0100
@@ -474,14 +474,11 @@
       // process received RACH preambles and notify the scheduler
       FfMacSchedSapProvider::SchedDlRachInfoReqParameters rachInfoReqParams;
       NS_ASSERT (subframeNo > 0 && subframeNo <= 10); // subframe in 1..10
-      // see TS 36.321 5.1.4;  preambles were sent two frames ago
-      // (plus 3GPP counts subframes from 0, not 1)
-      uint16_t raRnti = subframeNo - 3; 
       for (std::map<uint8_t, uint32_t>::const_iterator it = m_receivedRachPreambleCount.begin ();
            it != m_receivedRachPreambleCount.end ();
            ++it)
         {
-          NS_LOG_INFO ("RA-RNTI " << raRnti << ", preambleId " << (uint32_t) it->first << ": " << it->second << " received");
+          NS_LOG_INFO (this << " preambleId " << (uint32_t) it->first << ": " << it->second << " received");
           NS_ASSERT (it->second != 0);
           if (it->second > 1)
             {
@@ -1026,8 +1023,10 @@
         }
     }
 
-  // RACH
+  // Random Access procedure: send RARs
   Ptr<RarLteControlMessage> rarMsg = Create<RarLteControlMessage> ();
+  // see TS 36.321 5.1.4;  preambles were sent two frames ago
+  // (plus 3GPP counts subframes from 0, not 1)
   uint16_t raRnti = m_subframeNo - 3;
   rarMsg->SetRaRnti (raRnti);
   for (unsigned int i = 0; i < ind.m_buildRarList.size (); i++)
--- a/src/lte/model/lte-spectrum-phy.cc	Tue Jan 08 13:45:31 2013 +0100
+++ b/src/lte/model/lte-spectrum-phy.cc	Tue Jan 08 12:57:51 2013 +0100
@@ -938,6 +938,7 @@
                       {
                         UlInfoListElement_s harqUlInfo;
                         harqUlInfo.m_rnti = tbId.m_rnti;
+                        harqUlInfo.m_tpc = 0;
                         if ((*itTb).second.corrupt)
                           {
                             harqUlInfo.m_receptionStatus = UlInfoListElement_s::NotOk;