Page MenuHomeFreeBSD

contrib/kyua: fix -Wshadow error
ClosedPublic

Authored by siva on Sep 3 2026, 3:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 14, 1:41 AM
Unknown Object (File)
Sat, Oct 10, 3:09 AM
Unknown Object (File)
Fri, Oct 9, 7:24 PM
Unknown Object (File)
Fri, Oct 9, 7:04 PM
Unknown Object (File)
Tue, Oct 6, 9:45 PM
Unknown Object (File)
Sat, Oct 3, 12:19 PM
Unknown Object (File)
Fri, Oct 2, 8:42 PM
Unknown Object (File)
Thu, Oct 1, 12:00 AM
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 Not Applicable
Unit
Tests Not Applicable

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.