Page MenuHomeFreeBSD

contrib/kyua: fix -Wshadow error
AcceptedPublic

Authored by siva on Thu, Sep 3, 3:23 PM.
Tags
None
Referenced Files
F170370583: D59346.diff
Fri, Sep 4, 12:05 PM
F170304425: D59346.diff
Fri, Sep 4, 5:56 AM
F170264392: D59346.id185712.diff
Fri, Sep 4, 2:06 AM
F170261953: D59346.id185712.diff
Fri, Sep 4, 1:56 AM
F170261149: D59346.diff
Fri, Sep 4, 1:52 AM
F170216361: D59346.id185712.diff
Thu, Sep 3, 10:02 PM
F170201243: D59346.id185712.diff
Thu, Sep 3, 8:39 PM
F170188934: D59346.id.diff
Thu, Sep 3, 7:18 PM
Subscribers

Details

Reviewers
igoro
ngie
rlibby
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.Thu, Sep 3, 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.Thu, Sep 3, 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.