Parcourir la source

[master] Fixed merge errors and some trivial warnings

Francis Dupont il y a 7 ans
Parent
commit
de3fcb076e

+ 5 - 4
src/bin/dhcp4/tests/get_config_unittest.cc

@@ -3905,7 +3905,8 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"hooks-libraries\": [ ],\n"
 "        \"host-reservation-identifiers\": [ \"hw-address\", \"duid\", \"circuit-id\", \"client-id\" ],\n"
 "        \"interfaces-config\": {\n"
-"            \"interfaces\": [ \"*\" ]\n"
+"            \"interfaces\": [ \"*\" ],\n"
+"            \"re-detect\": false\n"
 "        },\n"
 "        \"lease-database\": {\n"
 "            \"type\": \"memfile\"\n"
@@ -3987,7 +3988,8 @@ const char* UNPARSED_CONFIGS[] = {
 "        \"hooks-libraries\": [ ],\n"
 "        \"host-reservation-identifiers\": [ \"hw-address\", \"duid\", \"circuit-id\", \"client-id\" ],\n"
 "        \"interfaces-config\": {\n"
-"            \"interfaces\": [ \"*\" ]\n"
+"            \"interfaces\": [ \"*\" ],\n"
+"            \"re-detect\": false\n"
 "        },\n"
 "        \"lease-database\": {\n"
 "            \"type\": \"memfile\"\n"
@@ -6157,7 +6159,6 @@ public:
 TEST_P(Dhcp4GetConfigTest, run) {
     // configurations have not been extracted yet
     if (max_config_counter == 0) {
-        std::cout << "#### max_config_counter=0, aborting" << std::endl;
         return;
     }
 
@@ -6221,6 +6222,6 @@ TEST_P(Dhcp4GetConfigTest, run) {
 
 /// Define the parametrized test loop
 INSTANTIATE_TEST_CASE_P(Dhcp4GetConfigTest, Dhcp4GetConfigTest,
-                        ::testing::Range(0UL, max_config_counter));
+                        ::testing::Range(static_cast<size_t>(0), max_config_counter));
 
 };

+ 2 - 2
src/lib/config/tests/client_connection_unittests.cc

@@ -147,7 +147,7 @@ TEST_F(ClientConnectionTest, timeout) {
     conn.start(ClientConnection::SocketPath(unixSocketFilePath()),
               ClientConnection::ControlCommand(command),
     [this, &handler_invoked](const boost::system::error_code& ec,
-                             const ConstJSONFeedPtr& feed) {
+                             const ConstJSONFeedPtr& /*feed*/) {
         // Indicate that the callback has been invoked to break the loop
         // below.
         handler_invoked = true;
@@ -173,7 +173,7 @@ TEST_F(ClientConnectionTest, connectionError) {
     conn.start(ClientConnection::SocketPath(unixSocketFilePath()),
                ClientConnection::ControlCommand(command),
     [this, &handler_invoked](const boost::system::error_code& ec,
-           const ConstJSONFeedPtr& feed) {
+                             const ConstJSONFeedPtr& /*feed*/) {
         handler_invoked = true;
         ASSERT_TRUE(ec);
     });

+ 1 - 1
src/lib/dhcpsrv/tests/timer_mgr_unittest.cc

@@ -130,7 +130,7 @@ TimerMgrTest::registerTimer(const std::string& timer_name, const long timer_inte
 }
 
 void
-TimerMgrTest::doWait(const long timeout, const bool call_receive) {
+TimerMgrTest::doWait(const long timeout, const bool /*call_receive*/) {
     IntervalTimer timer(*io_service_);
     timer.setup([this]() {
         io_service_->stop();

+ 0 - 2
src/lib/dhcpsrv/timer_mgr.cc

@@ -209,8 +209,6 @@ TimerMgrImpl::unregisterTimer(const std::string& timer_name) {
     // Cancel any pending asynchronous operation and stop the timer.
     cancel(timer_name);
 
-    const TimerInfoPtr& timer_info = timer_info_it->second;
-
     // Remove the timer.
     registered_timers_.erase(timer_info_it);
 }