From dd0348f3c9b02ad73bfdb1be82c6e4b001812dcc Mon Sep 17 00:00:00 2001 From: Sirac Ozmen Date: Sun, 8 Nov 2026 13:49:23 +0300 Subject: [PATCH] test(process): stop shadowing the withheld variables test's reader gcc 14 refuses the test from #227 under -Wshadow -Werror: the lambda kRead names its output path kRead too, which clang accepts. Main's gcc-debug tree no longer built, so its check failed. --- modules/process/tests/child_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/process/tests/child_test.cpp b/modules/process/tests/child_test.cpp index 91b55040..538c729a 100644 --- a/modules/process/tests/child_test.cpp +++ b/modules/process/tests/child_test.cpp @@ -156,16 +156,16 @@ RAWFRAME_TEST(AChildIsNotGivenTheVariablesWithheldFromIt) { kSet("RAWFRAME_WITHHELD", "held"); kSet("RAWFRAME_GIVEN", "given"); const auto kRead = [&kWithheld](const char* name, const char* file) { - const std::filesystem::path kRead = scratch(file); + const std::filesystem::path kOutput = scratch(file); auto read = Child::start({.program = RAWFRAME_PROCESS_CHILD, .arguments = {"variable", name}, - .output = kRead, + .output = kOutput, .withheld = kWithheld}); RAWFRAME_EXPECT(startedAll(read)); if (read.has_value()) { RAWFRAME_EXPECT(waitFor(*read) == 0); } - return test::readFile(kRead.string()); + return test::readFile(kOutput.string()); }; RAWFRAME_EXPECT(kRead("RAWFRAME_WITHHELD", "withheld.txt") == "none"); RAWFRAME_EXPECT(kRead("RAWFRAME_GIVEN", "given.txt") == "given");