Page MenuHomeFreeBSD

contrib/kyua: fix -Wshadow error
ClosedPublic

Authored by siva on Thu, Sep 3, 3:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 6, 6:09 AM
Unknown Object (File)
Sun, Sep 6, 2:22 AM
Unknown Object (File)
Sat, Sep 5, 7:31 PM
Unknown Object (File)
Sat, Sep 5, 4:55 PM
Unknown Object (File)
Sat, Sep 5, 2:12 AM
Unknown Object (File)
Fri, Sep 4, 12:05 PM
Unknown Object (File)
Fri, Sep 4, 5:56 AM
Unknown Object (File)
Fri, Sep 4, 2:06 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 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.

This revision was automatically updated to reflect the committed changes.