From: Andrei Pavel Date: Mon, 20 Oct 2025 13:51:11 +0000 (+0300) Subject: [#3451] Address Wshadow warnings about client_class from g++ X-Git-Tag: Kea-3.1.3~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=688bc804141d28c8df006fec791a5db4368ef085;p=thirdparty%2Fkea.git [#3451] Address Wshadow warnings about client_class from g++ --- diff --git a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc index fc2ef2d81c..e7ed5856f5 100644 --- a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc +++ b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.cc @@ -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); }); diff --git a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc index e5edc18f0b..cfbb8eeebc 100644 --- a/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc +++ b/src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.cc @@ -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); });