From 88af44874f2f8026bb12569a24aa7bdcaba8401d Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Thu, 16 Oct 2025 13:34:30 +0300 Subject: [PATCH] [#3451] Address Wshadow warnings --- src/lib/dhcpsrv/tests/cfg_option_unittest.cc | 7 +++---- src/lib/util/filesystem.cc | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/dhcpsrv/tests/cfg_option_unittest.cc b/src/lib/dhcpsrv/tests/cfg_option_unittest.cc index dbcd5325ed..2e6797d230 100644 --- a/src/lib/dhcpsrv/tests/cfg_option_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_option_unittest.cc @@ -1519,11 +1519,10 @@ TEST_F(CfgOptionTest, optionsWithClientClasses) { // Verify that CfgOption::get() with client classes returns // each one correctly. - for (auto &reference_desc : reference_options) { - OptionDescriptor found_desc = cfg.get(DHCP6_OPTION_SPACE, 777, - reference_desc.client_classes_); + for (OptionDescriptor const& rd : reference_options) { + found_desc = cfg.get(DHCP6_OPTION_SPACE, 777, rd.client_classes_); ASSERT_TRUE(found_desc.option_); - ASSERT_EQ(found_desc, reference_desc); + ASSERT_EQ(found_desc, rd); } } diff --git a/src/lib/util/filesystem.cc b/src/lib/util/filesystem.cc index d250b75b7b..fb0a0161ac 100644 --- a/src/lib/util/filesystem.cc +++ b/src/lib/util/filesystem.cc @@ -312,7 +312,6 @@ PathChecker::validatePath(const std::string input_path_str, std::string PathChecker::validateDirectory(const std::string input_path_str, bool enforce_path /* = PathChecker::shouldEnforceSecurity() */) const { - std::string input_copy = trim(input_path_str); // We only allow absolute path equal to default. Catch an invalid path. if (!input_path_str.empty()) { std::string input_copy = input_path_str; -- 2.47.3