8000 refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts by maflcko · Pull Request #26409 · bitcoin/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

maflcko
Copy link
Member
@maflcko maflcko commented Oct 28, 2022

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" {}.

Copy link
Member
@hebasto hebasto left a comment

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.

Copy link
Member
@jonatack jonatack left a comment

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
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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 30, 2022
…s in ChainstateManagerOpts

fa29ef0 refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts (MacroFake)

Pull request description:

  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" `{}`.

ACKs for top commit:
  achow101:
    ACK fa29ef0
  hebasto:
    ACK fa29ef0, tested on Ubuntu 22.04 + GCC 11.3.
  jonatack:
    ACK fa29ef0

Tree-SHA512: bdec9c56df5d601a5616e107fed48737b13b0a7242b6526092fb682b5016544a4bc08666b60304c668d44c6f7ac69d3788093d921382c1d6c577c1f9fe31fc50
@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
0