mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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: edb230c4af
Reviewed by: igoro, rlibby, ngie
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59346
This commit is contained in:
1 parent
d7ed56b0fc
commit
a73bb621ca
1 file changed
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user