]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3451] Address Wshadow warnings about client_class from g++
authorAndrei Pavel <andrei@isc.org>
Mon, 20 Oct 2025 13:51:11 +0000 (16:51 +0300)
committerAndrei Pavel <andrei@isc.org>
Sun, 26 Oct 2025 16:58:23 +0000 (18:58 +0200)
src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc
src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc

index fc2ef2d81cda588cb3ed59a8cf99a5102a119b57..e7ed5856f52937dbe84fff1f7cbdcd2058762896 100644 (file)
@@ -2504,13 +2504,13 @@ public:
             // reporting the parsing error. The dependency check is performed later
             // at the database level.
             parser.parse(expression, Element::create(client_class->getTest()), AF_INET,
-                         [&dependencies, &depend_on_known](const ClientClass& client_class) -> bool {
-                if (isClientClassBuiltIn(client_class)) {
-                    if ((client_class == "KNOWN") || (client_class == "UNKNOWN")) {
+                         [&dependencies, &depend_on_known](const ClientClass& cc) -> bool {
+                if (isClientClassBuiltIn(cc)) {
+                    if ((cc == "KNOWN") || (cc == "UNKNOWN")) {
                         depend_on_known = true;
                     }
                 } else {
-                    dependencies.push_back(client_class);
+                    dependencies.push_back(cc);
                 }
                 return (true);
             });
index e5edc18f0b694f0b94b6144c6b836897cd7fe4dc..cfbb8eeebc20fc72414bc4344dbcab98364386f4 100644 (file)
@@ -551,7 +551,7 @@ public:
                 }
             }
 
-            // Pool is between 15 and 19 with extra between 79 and 81 
+            // Pool is between 15 and 19 with extra between 79 and 81
 
             // If the row contains information about the pool and it
             // appears to be new pool entry (checked by comparing pool
@@ -2826,13 +2826,13 @@ public:
             // reporting the parsing error. The dependency check is performed later
             // at the database level.
             parser.parse(expression, Element::create(client_class->getTest()), AF_INET6,
-                         [&dependencies, &depend_on_known](const ClientClass& client_class) -> bool {
-                if (isClientClassBuiltIn(client_class)) {
-                    if ((client_class == "KNOWN") || (client_class == "UNKNOWN")) {
+                         [&dependencies, &depend_on_known](const ClientClass& cc) -> bool {
+                if (isClientClassBuiltIn(cc)) {
+                    if ((cc == "KNOWN") || (cc == "UNKNOWN")) {
                         depend_on_known = true;
                     }
                 } else {
-                    dependencies.push_back(client_class);
+                    dependencies.push_back(cc);
                 }
                 return (true);
             });