]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2618] fixed another Wshadow and a Wpedantic
authorAndrei Pavel <andrei@isc.org>
Mon, 3 Jun 2024 11:36:23 +0000 (14:36 +0300)
committerFrancis Dupont <fdupont@isc.org>
Wed, 5 Jun 2024 08:13:55 +0000 (10:13 +0200)
iface_mgr_unittest.cc:2853:25: warning: declaration shadows a local variable [-Wshadow]
shared_network_unittest.cc:430:14: warning: use of non-standard escape character '\{' [-Wpedantic]

src/bin/dhcp6/tests/shared_network_unittest.cc
src/lib/dhcp/tests/iface_mgr_unittest.cc

index 1e07960c344d3fd2bfa1227bd365601fc59c63ec..4571c7500619b2afd8774cad88bba9f6933abde6 100644 (file)
@@ -427,7 +427,7 @@ const char* NETWORKS_CONFIG[] = {
     "        }"
     "    ],"
     "    \"subnet6\": ["
-    "        \{"
+    "        {"
     "            \"subnet\": \"3000::/96\","
     "            \"id\": 1000,"
     "            \"interface\": \"eth0\","
index 0ec0c47f8a1d914bbad8c3992c13d6d59c0ea161..b540b502dcda15c59e6b8ec95f22eb6d3a03b80d 100644 (file)
@@ -2850,8 +2850,7 @@ checkIfAddrs(const Iface & iface, struct ifaddrs *& ifptr) {
             isc_throw(Unexpected, "Cannot set SIOCGIFHWADDR flag");
         }
 
-        const uint8_t * p =
-            reinterpret_cast<uint8_t *>(ifr.ifr_ifru.ifru_hwaddr.sa_data);
+        p = reinterpret_cast<uint8_t *>(ifr.ifr_ifru.ifru_hwaddr.sa_data);
 
         close(s);