diff --git a/src/core/examples/empirical-random-variable-example.cc b/src/core/examples/empirical-random-variable-example.cc index d5b49f68f..e5b003782 100644 --- a/src/core/examples/empirical-random-variable-example.cc +++ b/src/core/examples/empirical-random-variable-example.cc @@ -200,14 +200,14 @@ main(int argc, char* argv[]) // Create the ERV in sampling mode Ptr erv = CreateObject(); - // // Expectation for bin - erv->CDF(0.0, 0.0 / 15.0); // 0 - erv->CDF(0.2, 1.0 / 15.0); // 0.2 1/15 = 2/150 - erv->CDF(0.4, 3.0 / 15.0); // 0.4 2/15 = 8/150 - erv->CDF(0.6, 4.0 / 15.0); // 0.6 1/15 = 6/150 - erv->CDF(0.8, 7.0 / 15.0); // 0.8 3/15 = 24/150 - erv->CDF(1.0, 9.0 / 15.0); // 1.0 2/15 = 20/150 - erv->CDF(1.0, 15.0 / 15.0); // 1.0 6/15 = 60/150 = 120/150 = 0.8 + // // Expectation for bin + erv->CDF(0.0, 0.0); // 0 + erv->CDF(0.2, 1.0 / 15.0); // 0.2 1/15 = 2/150 + erv->CDF(0.4, 3.0 / 15.0); // 0.4 2/15 = 8/150 + erv->CDF(0.6, 4.0 / 15.0); // 0.6 1/15 = 6/150 + erv->CDF(0.8, 7.0 / 15.0); // 0.8 3/15 = 24/150 + erv->CDF(1.0, 9.0 / 15.0); // 1.0 2/15 = 20/150 + erv->CDF(1.0, 1.0); // 1.0 6/15 = 60/150 = 120/150 = 0.8 if (single) { diff --git a/src/core/examples/main-random-variable-stream.cc b/src/core/examples/main-random-variable-stream.cc index d86a3fb4d..69813a33d 100644 --- a/src/core/examples/main-random-variable-stream.cc +++ b/src/core/examples/main-random-variable-stream.cc @@ -268,12 +268,12 @@ main(int argc, char* argv[]) plot.AppendExtra("set xrange [*:*]"); auto x = CreateObject(); - x->CDF(0.0, 0.0 / 15.0); + x->CDF(0.0, 0.0); x->CDF(0.2, 1.0 / 15.0); x->CDF(0.4, 3.0 / 15.0); x->CDF(0.6, 6.0 / 15.0); x->CDF(0.8, 10.0 / 15.0); - x->CDF(1.0, 15.0 / 15.0); + x->CDF(1.0, 1.0); plot.AddDataset( Histogram(x, probes, precision, "EmpiricalRandomVariable (Sampling)", true)); diff --git a/src/core/test/int64x64-test-suite.cc b/src/core/test/int64x64-test-suite.cc index 01ab49901..38594bbe7 100644 --- a/src/core/test/int64x64-test-suite.cc +++ b/src/core/test/int64x64-test-suite.cc @@ -1152,6 +1152,7 @@ class Int64x64DoubleTestCase : public TestCase * * This will lie in the closed interval [0, 64] */ + // NOLINTNEXTLINE(misc-redundant-expression) static constexpr int MISS_MANT_DIG = std::max(0, 64 - LDBL_MANT_DIG); /** diff --git a/src/lte/model/lte-enb-rrc.cc b/src/lte/model/lte-enb-rrc.cc index f702796f3..a3b5b1f44 100644 --- a/src/lte/model/lte-enb-rrc.cc +++ b/src/lte/model/lte-enb-rrc.cc @@ -1217,9 +1217,6 @@ UeManager::RecvRrcConnectionReconfigurationCompleted( // This case is added to NS-3 in order to handle bearer de-activation scenario for CONNECTED // state UE case CONNECTED_NORMALLY: - NS_LOG_INFO("ignoring RecvRrcConnectionReconfigurationCompleted in state " << m_state); - break; - case HANDOVER_LEAVING: NS_LOG_INFO("ignoring RecvRrcConnectionReconfigurationCompleted in state " << m_state); break; diff --git a/src/olsr/model/olsr-routing-protocol.cc b/src/olsr/model/olsr-routing-protocol.cc index 0fe52d6d0..7021f28a0 100644 --- a/src/olsr/model/olsr-routing-protocol.cc +++ b/src/olsr/model/olsr-routing-protocol.cc @@ -3032,6 +3032,7 @@ RoutingProtocol::RouteInput(Ptr p, NS_LOG_LOGIC("No dynamic route, check network routes"); if (m_hnaRoutingTable->RouteInput(p, header, idev, ucb, mcb, lcb, ecb)) { + // NOLINTNEXTLINE(readability-simplify-boolean-expr) return true; } else