From de78d418b4ae5d6682e7c81853791f99e37b41a7 Mon Sep 17 00:00:00 2001 From: Nicola Baldo Date: Tue, 8 Jan 2013 12:57:51 +0100 Subject: [PATCH] fix compilation warnings in optimized mode --- src/lte/helper/lte-helper.cc | 10 +++++----- src/lte/model/lte-enb-mac.cc | 9 ++++----- src/lte/model/lte-spectrum-phy.cc | 1 + 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lte/helper/lte-helper.cc b/src/lte/helper/lte-helper.cc index 9ba085a34..0533c38b9 100644 --- a/src/lte/helper/lte-helper.cc +++ b/src/lte/helper/lte-helper.cc @@ -990,7 +990,7 @@ uint64_t 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 @@ FindImsiForEnb (std::string path, uint16_t rnti) 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 @@ uint64_t 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; diff --git a/src/lte/model/lte-enb-mac.cc b/src/lte/model/lte-enb-mac.cc index 223ac25b2..2baa5d2e8 100644 --- a/src/lte/model/lte-enb-mac.cc +++ b/src/lte/model/lte-enb-mac.cc @@ -474,14 +474,11 @@ LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo) // 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::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 @@ LteEnbMac::DoSchedDlConfigInd (FfMacSchedSapUser::SchedDlConfigIndParameters ind } } - // RACH + // Random Access procedure: send RARs Ptr rarMsg = Create (); + // 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++) diff --git a/src/lte/model/lte-spectrum-phy.cc b/src/lte/model/lte-spectrum-phy.cc index 1470ddf81..bfd4425bb 100644 --- a/src/lte/model/lte-spectrum-phy.cc +++ b/src/lte/model/lte-spectrum-phy.cc @@ -938,6 +938,7 @@ LteSpectrumPhy::EndRxData () { UlInfoListElement_s harqUlInfo; harqUlInfo.m_rnti = tbId.m_rnti; + harqUlInfo.m_tpc = 0; if ((*itTb).second.corrupt) { harqUlInfo.m_receptionStatus = UlInfoListElement_s::NotOk;