Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(652)

Unified Diff: src/lte/model/lte-enb-phy.cc

Issue 338840043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Patch updates for x64 build Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lte/model/lte-enb-phy.h ('k') | src/lte/model/lte-enb-rrc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lte/model/lte-enb-phy.cc
===================================================================
--- a/src/lte/model/lte-enb-phy.cc
+++ b/src/lte/model/lte-enb-phy.cc
@@ -334,7 +334,7 @@
LteEnbPhy::DoGetReferenceSignalPower () const
{
NS_LOG_FUNCTION (this);
- return m_txPower;
+ return static_cast<int8_t>(m_txPower);
}
void
@@ -602,7 +602,7 @@
m_nrSubFrames = 0;
// send MIB at beginning of every frame
- m_mib.systemFrameNumber = m_nrSubFrames;
+ m_mib.systemFrameNumber = static_cast<uint8_t>(m_nrSubFrames);
Ptr<MibLteControlMessage> mibMsg = Create<MibLteControlMessage> ();
mibMsg->SetMib (m_mib);
m_controlMessagesQueue.at (0).push_back (mibMsg);
@@ -682,8 +682,7 @@
m_dlPowerAllocationMap.clear ();
if (ctrlMsg.size () > 0)
{
- std::list<Ptr<LteControlMessage> >::iterator it;
- it = ctrlMsg.begin ();
+ std::list<Ptr<LteControlMessage> >::iterator it = ctrlMsg.begin ();
while (it != ctrlMsg.end ())
{
Ptr<LteControlMessage> msg = (*it);
@@ -733,13 +732,13 @@
else if (msg->GetMessageType () == LteControlMessage::RAR)
{
Ptr<RarLteControlMessage> rarMsg = DynamicCast<RarLteControlMessage> (msg);
- for (std::list<RarLteControlMessage::Rar>::const_iterator it = rarMsg->RarListBegin (); it != rarMsg->RarListEnd (); ++it)
+ for (std::list<RarLteControlMessage::Rar>::const_iterator rit = rarMsg->RarListBegin (); rit != rarMsg->RarListEnd (); ++rit)
{
- if (it->rarPayload.m_grant.m_ulDelay == true)
+ if (rit->rarPayload.m_grant.m_ulDelay == true)
{
NS_FATAL_ERROR (" RAR delay is not yet implemented");
}
- UlGrant_s ulGrant = it->rarPayload.m_grant;
+ UlGrant_s ulGrant = rit->rarPayload.m_grant;
// translate the UL grant in a standard UL-DCI and queue it
UlDciListElement_s dci;
dci.m_rnti = ulGrant.m_rnti;
@@ -751,9 +750,9 @@
dci.m_tpc = ulGrant.m_tpc;
dci.m_cqiRequest = ulGrant.m_cqiRequest;
dci.m_ndi = 1;
- UlDciLteControlMessage msg;
- msg.SetDci (dci);
- QueueUlDci (msg);
+ UlDciLteControlMessage ulmsg;
+ ulmsg.SetDci (dci);
+ QueueUlDci (ulmsg);
}
}
it++;
@@ -874,6 +873,7 @@
void
LteEnbPhy::ReportRsReceivedPower (const SpectrumValue& power)
{
+ NS_UNUSED(power);
// not used by eNB
}
@@ -918,7 +918,7 @@
{
if (dlBandwidth < Type0AllocationRbg[i])
{
- m_rbgSize = i + 1;
+ m_rbgSize = static_cast<uint8_t>(i + 1);
break;
}
}
@@ -940,6 +940,7 @@
bool success = AddUePhy (rnti);
NS_ASSERT_MSG (success, "AddUePhy() failed");
+ (void)success; // make compiler happy
// add default P_A value
DoSetPa (rnti, 0);
@@ -952,6 +953,7 @@
bool success = DeleteUePhy (rnti);
NS_ASSERT_MSG (success, "DeleteUePhy() failed");
+ (void)success; // make compiler happy
// remove also P_A value
std::map<uint16_t, double>::iterator it = m_paMap.find (rnti);
« no previous file with comments | « src/lte/model/lte-enb-phy.h ('k') | src/lte/model/lte-enb-rrc.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b