git: a73bb621ca36 - main - contrib/kyua: fix -Wshadow error

From: Siva Mahadevan <siva_at_FreeBSD.org>
Date: Sat, 05 Sep 2026 14:13:22 UTC
The branch main has been updated by siva:

URL: https://cgit.FreeBSD.org/src/commit/?id=a73bb621ca361edc678bbf49f3ca1acca8aa0344

commit a73bb621ca361edc678bbf49f3ca1acca8aa0344
Author:     Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-05 14:12:11 +0000
Commit:     Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-09-05 14:12:11 +0000

    contrib/kyua: fix -Wshadow error
    
    This fixes the build with gcc 14:
    
    /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:56:16: error: declaration of 'handler' shadows a member of 'engine::prepare::prepare_all' [-Werror=shadow]
       56 |     for (auto& handler : prepare::handlers()) {
          |                ^~~~~~~
    In file included from /usr/src/contrib/kyua/engine/prepare/prepare_all.hpp:35,
                     from /usr/src/contrib/kyua/engine/prepare/prepare_all.cpp:29:
    /usr/src/contrib/kyua/engine/prepare/prepare.hpp:51:15: note: shadowed declaration is here
       51 | class handler {
          |               ^
    
    Fixes:  edb230c4af499203d7a6894b3711fe6574b26040
    
    Reviewed by:    igoro, rlibby, ngie
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D59346
---
 contrib/kyua/engine/prepare/prepare_all.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/kyua/engine/prepare/prepare_all.cpp b/contrib/kyua/engine/prepare/prepare_all.cpp
index db8ea330a51e..73591ef5822a 100644
--- a/contrib/kyua/engine/prepare/prepare_all.cpp
+++ b/contrib/kyua/engine/prepare/prepare_all.cpp
@@ -53,11 +53,11 @@ prepare::prepare_all::exec(cmdline::ui* ui,
                            const cmdline::parsed_cmdline& cmdline,
                            const config::tree& user_config) const
 {
-    for (auto& handler : prepare::handlers()) {
-        if (handler->name() == this->name())
+    for (auto& h : prepare::handlers()) {
+        if (h->name() == this->name())
             continue;
 
-        int error = handler->exec(ui, cmdline, user_config);
+        int error = h->exec(ui, cmdline, user_config);
         if (error != EXIT_SUCCESS)
             return error;
     }