git: c0e03beeee8c - stable/14 - contrib/kyua: fix -Wshadow error

From: Enji Cooper <ngie_at_FreeBSD.org>
Date: Mon, 23 Nov 2026 01:39:35 UTC
The branch stable/14 has been updated by ngie:

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

commit c0e03beeee8c84bcbdc1605065f43408b2fb7ac3
Author:     Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-05 14:12:11 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 01:35:53 +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
    
    (cherry picked from commit a73bb621ca361edc678bbf49f3ca1acca8aa0344)
---
 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;
     }