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)
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
Unknown Object (File)
Thu, Sep 17, 3:05 PM
Unknown Object (File)
Tue, Sep 15, 2:25 PM
Unknown Object (File)
Mon, Sep 14, 4:34 PM
Unknown Object (File)
Sun, Sep 13, 8:13 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.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.