diff --git a/src/internet/test/tcp-header-test.cc b/src/internet/test/tcp-header-test.cc index 05b4c7516..3fd1c9337 100644 --- a/src/internet/test/tcp-header-test.cc +++ b/src/internet/test/tcp-header-test.cc @@ -382,9 +382,6 @@ TcpHeaderWithRFC793OptionTestCase::OneOptionAtTime() void TcpHeaderWithRFC793OptionTestCase::DoTeardown() { - uint32_t foo; - foo = UINT32_MAX; - foo--; } /** diff --git a/src/lte/model/cqa-ff-mac-scheduler.cc b/src/lte/model/cqa-ff-mac-scheduler.cc index e8805395d..56e9bff22 100644 --- a/src/lte/model/cqa-ff-mac-scheduler.cc +++ b/src/lte/model/cqa-ff-mac-scheduler.cc @@ -704,7 +704,6 @@ CqaFfMacScheduler::DoSchedDlTriggerReq( } // RACH Allocation - uint16_t rbAllocatedNum = 0; std::vector ulRbMap; ulRbMap.resize(m_cschedCellConfig.m_ulBandwidth, false); ulRbMap = m_ffrSapProvider->GetAvailableUlRbg(); @@ -718,7 +717,6 @@ CqaFfMacScheduler::DoSchedDlTriggerReq( { if ((*it) == true) { - rbAllocatedNum++; if (tmpMinBandwidth > maxContinuousUlBandwidth) { maxContinuousUlBandwidth = tmpMinBandwidth; @@ -1610,7 +1608,6 @@ CqaFfMacScheduler::DoSchedDlTriggerReq( // RBGs of the same RNTI) // FfMacSchedSapUser::SchedDlConfigIndParameters ret; itMap = allocationMapPerRntiPerLCId.begin(); - int counter = 0; std::map m_rnti_per_ratio; while (itMap != allocationMapPerRntiPerLCId.end()) @@ -1649,7 +1646,6 @@ CqaFfMacScheduler::DoSchedDlTriggerReq( { worstCqi = it->second.cqi_value_for_lc; } - counter++; } newDci.m_mcs.push_back(m_amc->GetMcsFromCqi(worstCqi)); diff --git a/src/lte/model/fdbet-ff-mac-scheduler.cc b/src/lte/model/fdbet-ff-mac-scheduler.cc index fd383cb83..c168eaa4f 100644 --- a/src/lte/model/fdbet-ff-mac-scheduler.cc +++ b/src/lte/model/fdbet-ff-mac-scheduler.cc @@ -1346,7 +1346,6 @@ FdBetFfMacScheduler::DoSchedUlTriggerReq( // Generate RBs map FfMacSchedSapUser::SchedUlConfigIndParameters ret; std::vector rbMap; - uint16_t rbAllocatedNum = 0; std::set rntiAllocated; std::vector rbgAllocationMap; // update with RACH allocation map @@ -1420,7 +1419,6 @@ FdBetFfMacScheduler::DoSchedUlTriggerReq( rbMap.at(j) = true; rbgAllocationMap.at(j) = dci.m_rnti; NS_LOG_INFO("\tRB " << j); - rbAllocatedNum++; } NS_LOG_INFO(this << " Send retx in the same RBs " << (uint16_t)dci.m_rbStart << " to " << dci.m_rbStart + dci.m_rbLen << " RV " diff --git a/src/lte/model/fdmt-ff-mac-scheduler.cc b/src/lte/model/fdmt-ff-mac-scheduler.cc index bdab0ab9d..41b7e7e1d 100644 --- a/src/lte/model/fdmt-ff-mac-scheduler.cc +++ b/src/lte/model/fdmt-ff-mac-scheduler.cc @@ -1306,7 +1306,6 @@ FdMtFfMacScheduler::DoSchedUlTriggerReq( // Generate RBs map FfMacSchedSapUser::SchedUlConfigIndParameters ret; std::vector rbMap; - uint16_t rbAllocatedNum = 0; std::set rntiAllocated; std::vector rbgAllocationMap; // update with RACH allocation map @@ -1380,7 +1379,6 @@ FdMtFfMacScheduler::DoSchedUlTriggerReq( rbMap.at(j) = true; rbgAllocationMap.at(j) = dci.m_rnti; NS_LOG_INFO("\tRB " << j); - rbAllocatedNum++; } NS_LOG_INFO(this << " Send retx in the same RBs " << (uint16_t)dci.m_rbStart << " to " << dci.m_rbStart + dci.m_rbLen << " RV " diff --git a/src/lte/model/fdtbfq-ff-mac-scheduler.cc b/src/lte/model/fdtbfq-ff-mac-scheduler.cc index 55489a551..e332fe15f 100644 --- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc +++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc @@ -570,7 +570,6 @@ FdTbfqFfMacScheduler::DoSchedDlTriggerReq( } // RACH Allocation - uint16_t rbAllocatedNum = 0; std::vector ulRbMap; ulRbMap.resize(m_cschedCellConfig.m_ulBandwidth, false); ulRbMap = m_ffrSapProvider->GetAvailableUlRbg(); @@ -584,7 +583,6 @@ FdTbfqFfMacScheduler::DoSchedDlTriggerReq( { if ((*it) == true) { - rbAllocatedNum++; if (tmpMinBandwidth > maxContinuousUlBandwidth) { maxContinuousUlBandwidth = tmpMinBandwidth; diff --git a/src/lte/model/lte-enb-phy.cc b/src/lte/model/lte-enb-phy.cc index 15a2b33c3..269271e0d 100644 --- a/src/lte/model/lte-enb-phy.cc +++ b/src/lte/model/lte-enb-phy.cc @@ -878,17 +878,15 @@ LteEnbPhy::CreatePuschCqiReport(const SpectrumValue& sinr) Values::const_iterator it; FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ulcqi; ulcqi.m_ulCqi.m_type = UlCqi_s::PUSCH; - int i = 0; for (it = sinr.ConstValuesBegin(); it != sinr.ConstValuesEnd(); it++) { double sinrdb = 10 * std::log10((*it)); - // NS_LOG_DEBUG ("ULCQI RB " << i << " value " << sinrdb); + // NS_LOG_DEBUG ("ULCQI RB " << i << " value " << sinrdb); // convert from double to fixed point notation Sxxxxxxxxxxx.xxx int16_t sinrFp = LteFfConverter::double2fpS11dot3(sinrdb); ulcqi.m_ulCqi.m_sinr.push_back(sinrFp); - i++; } - return (ulcqi); + return ulcqi; } void diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index de49b4e68..5f6f0e248 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -819,14 +819,12 @@ LteUePhy::ReportRsReceivedPower(const SpectrumValue& power) if (m_enableUplinkPowerControl) { double sum = 0; - uint32_t rbNum = 0; Values::const_iterator it; for (it = m_rsReceivedPower.ConstValuesBegin(); it != m_rsReceivedPower.ConstValuesEnd(); it++) { double powerTxW = ((*it) * 180000); sum += powerTxW; - rbNum++; } double rsrp = 10 * log10(sum) + 30; diff --git a/src/lte/model/pf-ff-mac-scheduler.cc b/src/lte/model/pf-ff-mac-scheduler.cc index 542f57685..465135490 100644 --- a/src/lte/model/pf-ff-mac-scheduler.cc +++ b/src/lte/model/pf-ff-mac-scheduler.cc @@ -518,7 +518,6 @@ PfFfMacScheduler::DoSchedDlTriggerReq( } // RACH Allocation - uint16_t rbAllocatedNum = 0; std::vector ulRbMap; ulRbMap.resize(m_cschedCellConfig.m_ulBandwidth, false); ulRbMap = m_ffrSapProvider->GetAvailableUlRbg(); @@ -532,7 +531,6 @@ PfFfMacScheduler::DoSchedDlTriggerReq( { if ((*it) == true) { - rbAllocatedNum++; if (tmpMinBandwidth > maxContinuousUlBandwidth) { maxContinuousUlBandwidth = tmpMinBandwidth; diff --git a/src/lte/model/pss-ff-mac-scheduler.cc b/src/lte/model/pss-ff-mac-scheduler.cc index 5c65934e6..06b83f5c0 100644 --- a/src/lte/model/pss-ff-mac-scheduler.cc +++ b/src/lte/model/pss-ff-mac-scheduler.cc @@ -550,7 +550,6 @@ PssFfMacScheduler::DoSchedDlTriggerReq( } // RACH Allocation - uint16_t rbAllocatedNum = 0; std::vector ulRbMap; ulRbMap.resize(m_cschedCellConfig.m_ulBandwidth, false); ulRbMap = m_ffrSapProvider->GetAvailableUlRbg(); @@ -564,7 +563,6 @@ PssFfMacScheduler::DoSchedDlTriggerReq( { if ((*it) == true) { - rbAllocatedNum++; if (tmpMinBandwidth > maxContinuousUlBandwidth) { maxContinuousUlBandwidth = tmpMinBandwidth; diff --git a/src/lte/model/rr-ff-mac-scheduler.cc b/src/lte/model/rr-ff-mac-scheduler.cc index 95a156db3..27c779df4 100644 --- a/src/lte/model/rr-ff-mac-scheduler.cc +++ b/src/lte/model/rr-ff-mac-scheduler.cc @@ -1201,7 +1201,6 @@ RrFfMacScheduler::DoSchedUlTriggerReq( // Generate RBs map FfMacSchedSapUser::SchedUlConfigIndParameters ret; std::vector rbMap; - uint16_t rbAllocatedNum = 0; std::set rntiAllocated; std::vector rbgAllocationMap; // update with RACH allocation map @@ -1275,7 +1274,6 @@ RrFfMacScheduler::DoSchedUlTriggerReq( rbMap.at(j) = true; rbgAllocationMap.at(j) = dci.m_rnti; NS_LOG_INFO("\tRB " << j); - rbAllocatedNum++; } NS_LOG_INFO(this << " Send retx in the same RBGs " << (uint16_t)dci.m_rbStart << " to " << dci.m_rbStart + dci.m_rbLen << " RV " diff --git a/src/lte/model/tdbet-ff-mac-scheduler.cc b/src/lte/model/tdbet-ff-mac-scheduler.cc index 244feca3c..5663090e2 100644 --- a/src/lte/model/tdbet-ff-mac-scheduler.cc +++ b/src/lte/model/tdbet-ff-mac-scheduler.cc @@ -1262,7 +1262,6 @@ TdBetFfMacScheduler::DoSchedUlTriggerReq( // Generate RBs map FfMacSchedSapUser::SchedUlConfigIndParameters ret; std::vector rbMap; - uint16_t rbAllocatedNum = 0; std::set rntiAllocated; std::vector rbgAllocationMap; // update with RACH allocation map @@ -1336,7 +1335,6 @@ TdBetFfMacScheduler::DoSchedUlTriggerReq( rbMap.at(j) = true; rbgAllocationMap.at(j) = dci.m_rnti; NS_LOG_INFO("\tRB " << j); - rbAllocatedNum++; } NS_LOG_INFO(this << " Send retx in the same RBs " << (uint16_t)dci.m_rbStart << " to " << dci.m_rbStart + dci.m_rbLen << " RV " diff --git a/src/lte/model/tdmt-ff-mac-scheduler.cc b/src/lte/model/tdmt-ff-mac-scheduler.cc index 724fd75e2..636b46bd0 100644 --- a/src/lte/model/tdmt-ff-mac-scheduler.cc +++ b/src/lte/model/tdmt-ff-mac-scheduler.cc @@ -1235,7 +1235,6 @@ TdMtFfMacScheduler::DoSchedUlTriggerReq( // Generate RBs map FfMacSchedSapUser::SchedUlConfigIndParameters ret; std::vector rbMap; - uint16_t rbAllocatedNum = 0; std::set rntiAllocated; std::vector rbgAllocationMap; // update with RACH allocation map @@ -1309,7 +1308,6 @@ TdMtFfMacScheduler::DoSchedUlTriggerReq( rbMap.at(j) = true; rbgAllocationMap.at(j) = dci.m_rnti; NS_LOG_INFO("\tRB " << j); - rbAllocatedNum++; } NS_LOG_INFO(this << " Send retx in the same RBs " << (uint16_t)dci.m_rbStart << " to " << dci.m_rbStart + dci.m_rbLen << " RV " diff --git a/src/lte/model/tdtbfq-ff-mac-scheduler.cc b/src/lte/model/tdtbfq-ff-mac-scheduler.cc index 800206cd3..3b44f9347 100644 --- a/src/lte/model/tdtbfq-ff-mac-scheduler.cc +++ b/src/lte/model/tdtbfq-ff-mac-scheduler.cc @@ -568,7 +568,6 @@ TdTbfqFfMacScheduler::DoSchedDlTriggerReq( } // RACH Allocation - uint16_t rbAllocatedNum = 0; std::vector ulRbMap; ulRbMap.resize(m_cschedCellConfig.m_ulBandwidth, false); ulRbMap = m_ffrSapProvider->GetAvailableUlRbg(); @@ -582,7 +581,6 @@ TdTbfqFfMacScheduler::DoSchedDlTriggerReq( { if ((*it) == true) { - rbAllocatedNum++; if (tmpMinBandwidth > maxContinuousUlBandwidth) { maxContinuousUlBandwidth = tmpMinBandwidth; diff --git a/src/lte/model/tta-ff-mac-scheduler.cc b/src/lte/model/tta-ff-mac-scheduler.cc index c676044ed..c218621a3 100644 --- a/src/lte/model/tta-ff-mac-scheduler.cc +++ b/src/lte/model/tta-ff-mac-scheduler.cc @@ -1323,7 +1323,6 @@ TtaFfMacScheduler::DoSchedUlTriggerReq( // Generate RBs map FfMacSchedSapUser::SchedUlConfigIndParameters ret; std::vector rbMap; - uint16_t rbAllocatedNum = 0; std::set rntiAllocated; std::vector rbgAllocationMap; // update with RACH allocation map @@ -1397,7 +1396,6 @@ TtaFfMacScheduler::DoSchedUlTriggerReq( rbMap.at(j) = true; rbgAllocationMap.at(j) = dci.m_rnti; NS_LOG_INFO("\tRB " << j); - rbAllocatedNum++; } NS_LOG_INFO(this << " Send retx in the same RBs " << (uint16_t)dci.m_rbStart << " to " << dci.m_rbStart + dci.m_rbLen << " RV " diff --git a/src/lte/test/test-lte-x2-handover.cc b/src/lte/test/test-lte-x2-handover.cc index e6523da98..70b869114 100644 --- a/src/lte/test/test-lte-x2-handover.cc +++ b/src/lte/test/test-lte-x2-handover.cc @@ -748,16 +748,16 @@ LteX2HandoverTestSuite::LteX2HandoverTestSuite() ue2bwd, }; - std::string hel6name("2 fwd"); - const std::list hel6{ - ue2fwd, - }; + // std::string hel6name("2 fwd"); + // const std::list hel6{ + // ue2fwd, + // }; - std::string hel7name("2 fwd & bwd"); - const std::list hel7{ - ue2fwd, - ue2bwd, - }; + // std::string hel7name("2 fwd & bwd"); + // const std::list hel7{ + // ue2fwd, + // ue2bwd, + // }; std::vector schedulers{ "ns3::RrFfMacScheduler", diff --git a/src/mpi/model/null-message-simulator-impl.cc b/src/mpi/model/null-message-simulator-impl.cc index 7cf4a5a12..a0a1a5e24 100644 --- a/src/mpi/model/null-message-simulator-impl.cc +++ b/src/mpi/model/null-message-simulator-impl.cc @@ -137,8 +137,6 @@ NullMessageSimulatorImpl::CalculateLookAhead() { NS_LOG_FUNCTION(this); - int num_local_nodes = 0; - if (MpiInterface::GetSize() > 1) { NodeContainer c = NodeContainer::GetGlobal(); @@ -149,8 +147,6 @@ NullMessageSimulatorImpl::CalculateLookAhead() continue; } - num_local_nodes++; - for (uint32_t i = 0; i < (*iter)->GetNDevices(); ++i) { Ptr localNetDevice = (*iter)->GetDevice(i); diff --git a/src/sixlowpan/model/sixlowpan-header.cc b/src/sixlowpan/model/sixlowpan-header.cc index 8880bfcdd..e2d758453 100644 --- a/src/sixlowpan/model/sixlowpan-header.cc +++ b/src/sixlowpan/model/sixlowpan-header.cc @@ -276,7 +276,6 @@ uint32_t SixLowPanHc1::Deserialize(Buffer::Iterator start) { Buffer::Iterator i = start; - uint32_t serializedSize = 3; uint8_t dispatch = i.ReadU8(); if (dispatch != SixLowPanDispatch::LOWPAN_HC1) @@ -304,21 +303,18 @@ SixLowPanHc1::Deserialize(Buffer::Iterator start) { m_srcInterface[j] = i.ReadU8(); } - serializedSize += 16; break; case HC1_PIIC: for (int j = 0; j < 8; j++) { m_srcPrefix[j] = i.ReadU8(); } - serializedSize += 8; break; case HC1_PCII: for (int j = 0; j < 8; j++) { m_srcInterface[j] = i.ReadU8(); } - serializedSize += 8; break; case HC1_PCIC: break; @@ -334,21 +330,18 @@ SixLowPanHc1::Deserialize(Buffer::Iterator start) { m_dstInterface[j] = i.ReadU8(); } - serializedSize += 16; break; case HC1_PIIC: for (int j = 0; j < 8; j++) { m_dstPrefix[j] = i.ReadU8(); } - serializedSize += 8; break; case HC1_PCII: for (int j = 0; j < 8; j++) { m_dstInterface[j] = i.ReadU8(); } - serializedSize += 8; break; case HC1_PCIC: break; @@ -362,14 +355,12 @@ SixLowPanHc1::Deserialize(Buffer::Iterator start) m_flowLabel = temp[2]; m_flowLabel = (m_flowLabel << 8) | temp[1]; m_flowLabel = (m_flowLabel << 8) | temp[0]; - serializedSize += 4; } switch (m_nextHeaderCompression) { case HC1_NC: m_nextHeader = i.ReadU8(); - serializedSize++; break; case HC1_TCP: m_nextHeader = Ipv6Header::IPV6_TCP;