Page MenuHomeFreeBSD

contrib/kyua: fix -Wshadow error
ClosedPublic

Authored by siva on Sep 3 2026, 3:23 PM.
Tags
None
Referenced Files
F174469726: D59346.id185712.diff
Sat, Oct 3, 12:19 PM
Unknown Object (File)
Fri, Oct 2, 8:42 PM
Unknown Object (File)
Thu, Oct 1, 12:00 AM
Unknown Object (File)
Wed, Sep 30, 10:49 PM
Unknown Object (File)
Sat, Sep 26, 4:48 AM
Unknown Object (File)
Wed, Sep 23, 8:26 AM
Unknown Object (File)
Tue, Sep 22, 10:59 PM
Unknown Object (File)
Sat, Sep 19, 10:51 PM
Subscribers

Details

Summary

This fixes the build with gcc 14:

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 /home/siva/f/main/contrib/kyua/engine/prepare/prepare_all.hpp:35,

from /home/siva/f/main/contrib/kyua/engine/prepare/prepare_all.cpp:29:

/home/siva/f/main/contrib/kyua/engine/prepare/prepare.hpp:51:15: note: shadowed declaration is here

51 | class handler {
   |               ^

Fixes: edb230c4af499203d7a6894b3711fe6574b26040

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76430
Build 73313: arc lint + arc unit

Event Timeline

siva requested review of this revision.Sep 3 2026, 3:23 PM

@igoro when the time comes, could you please submit this upstream as well along with the prepare support?

This revision is now accepted and ready to land.Sep 3 2026, 4:26 PM

LGTM. The funny thing is that originally it was h.

@igoro when the time comes, could you please submit this upstream as well along with the prepare support?

Yes, this is what I was thinking about, considering you're working towards the next release.

This revision was automatically updated to reflect the committed changes.