From b0640f8065e7ca742e136669ad0f81cb58996edd Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr." Date: Thu, 14 Nov 2013 15:25:33 -0800 Subject: [PATCH] Fix compiler warnings and missing std:: --- src/lte/model/lte-common.cc | 4 ++-- src/lte/model/lte-ue-rrc.cc | 2 +- src/lte/test/test-lte-handover-target.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lte/model/lte-common.cc b/src/lte/model/lte-common.cc index b5a81b870..de2f1b165 100644 --- a/src/lte/model/lte-common.cc +++ b/src/lte/model/lte-common.cc @@ -269,7 +269,7 @@ EutranMeasurementMapping::ActualHysteresis2IeValue (double hysteresisDb) } uint8_t ieValue = lround (hysteresisDb * 2.0); - NS_ASSERT (ieValue >= 0); + // NS_ASSERT (ieValue >= 0); // always true due to limited range of data type NS_ASSERT (ieValue <= 30); return ieValue; } @@ -301,7 +301,7 @@ EutranMeasurementMapping::ActualA3Offset2IeValue (double a3OffsetDb) } uint8_t ieValue = lround (a3OffsetDb * 2.0); - NS_ASSERT (ieValue >= -30); + // NS_ASSERT (ieValue >= -30); // always true due to limited range of data type NS_ASSERT (ieValue <= 30); return ieValue; } diff --git a/src/lte/model/lte-ue-rrc.cc b/src/lte/model/lte-ue-rrc.cc index 3183ecaeb..8f300c123 100644 --- a/src/lte/model/lte-ue-rrc.cc +++ b/src/lte/model/lte-ue-rrc.cc @@ -1487,7 +1487,7 @@ LteUeRrc::SaveUeMeasurements (uint16_t cellId, double rsrp, double rsrq, storedMeasIt->second.rsrp = (1 - m_varMeasConfig.aRsrp) * storedMeasIt->second.rsrp + m_varMeasConfig.aRsrp * rsrp; - if (isnan (storedMeasIt->second.rsrq)) + if (std::isnan (storedMeasIt->second.rsrq)) { // the previous RSRQ measurements provided UE PHY are invalid storedMeasIt->second.rsrq = rsrq; // replace it with unfiltered value diff --git a/src/lte/test/test-lte-handover-target.cc b/src/lte/test/test-lte-handover-target.cc index 5034a026f..5ccdab6fc 100644 --- a/src/lte/test/test-lte-handover-target.cc +++ b/src/lte/test/test-lte-handover-target.cc @@ -156,12 +156,12 @@ LteHandoverTargetTestCase::LteHandoverTargetTestCase (std::string name, Vector u uint16_t nEnb = gridSizeX * gridSizeY; - if ((sourceCellId < 0) && (sourceCellId > nEnb)) + if (sourceCellId > nEnb) { NS_FATAL_ERROR ("Invalid source cell ID " << sourceCellId); } - if ((targetCellId < 0) && (targetCellId > nEnb)) + if (targetCellId > nEnb) { NS_FATAL_ERROR ("Invalid target cell ID " << targetCellId); }