diff --git a/examples/tcp/tcp-bbr-example.cc b/examples/tcp/tcp-bbr-example.cc index ade6f88df..d00e1bdb3 100644 --- a/examples/tcp/tcp-bbr-example.cc +++ b/examples/tcp/tcp-bbr-example.cc @@ -213,7 +213,10 @@ int main (int argc, char *argv []) // Create a new directory to store the output of the program dir = "bbr-results/" + currentTime + "/"; std::string dirToSave = "mkdir -p " + dir; - system (dirToSave.c_str ()); + if (system (dirToSave.c_str ()) == -1) + { + exit (1); + } // The plotting scripts are provided in the following repository, if needed: // https://github.com/mohittahiliani/BBR-Validation/ @@ -236,7 +239,10 @@ int main (int argc, char *argv []) // Generate PCAP traces if it is enabled if (enablePcap) { - system ((dirToSave + "/pcap/").c_str ()); + if (system ((dirToSave + "/pcap/").c_str ()) == -1) + { + exit (1); + } bottleneckLink.EnablePcapAll (dir + "/pcap/bbr", true); } diff --git a/src/internet/model/tcp-bbr.cc b/src/internet/model/tcp-bbr.cc index edaca04a0..6cb5339ae 100644 --- a/src/internet/model/tcp-bbr.cc +++ b/src/internet/model/tcp-bbr.cc @@ -652,6 +652,7 @@ TcpBbr::WhichState (BbrMode_t mode) const return "BBR_PROBE_RTT"; } NS_ASSERT (false); + return ""; } void diff --git a/src/internet/test/tcp-bbr-test.cc b/src/internet/test/tcp-bbr-test.cc index 98547f0c5..e9e78d457 100644 --- a/src/internet/test/tcp-bbr-test.cc +++ b/src/internet/test/tcp-bbr-test.cc @@ -107,8 +107,8 @@ TcpBbrCheckGainValuesTest::ExecuteTest () { Ptr cong = CreateObject (); cong->SetAttribute ("HighGain", DoubleValue (m_highGain)); - double actualPacingGain, actualCwndGain, desiredPacingGain, desiredCwndGain; - TcpBbr::BbrMode_t desiredMode; + double actualPacingGain, actualCwndGain, desiredPacingGain = m_highGain, desiredCwndGain = m_highGain; + TcpBbr::BbrMode_t desiredMode = TcpBbr::BBR_STARTUP; switch (m_mode) { case TcpBbr::BBR_STARTUP: