Skip to content

refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts - #26409

Merged
achow101 merged 1 commit into
bitcoin:masterfrom
maflcko:2210-gcc-🏾
Oct 28, 2022

Hidden character warning

The head ref may contain hidden characters: "2210-gcc-\ud83c\udffe"
Merged

achow101 merged 1 commit into
bitcoin:masterfrom
maflcko:2210-gcc-🏾

Conversation

@maflcko

@maflcko maflcko commented Oct 28, 2022

Copy link
Copy Markdown
Member

The std::optional fields in the struct that fall back to chain param defaults if not provided should be initialized to std::nullopt. This already happens with the current code.

However, for consistency with check_block_index and to silence a GCC warning, add the "missing" {}.

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa29ef0, tested on Ubuntu 22.04 + GCC 11.3.

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK fa29ef0

Didn't test building with GCC (with Clang 14 yes) but the changes look correct.

@achow101

Copy link
Copy Markdown
Member

ACK fa29ef0

@achow101
achow101 merged commit 8b05076 into bitcoin:master Oct 28, 2022
@maflcko
maflcko deleted the 2210-gcc-🏾 branch October 29, 2022 08:37
@bitcoin bitcoin locked and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants