-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Remove false positive GCC warning #18052
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kristapsk
approved these changes
Feb 2, 2020
Contributor
kristapsk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e9434ee
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
Member
|
ACK e9434ee, removes the warning for me (gcc 7.4.0) |
laanwj
added a commit
that referenced
this pull request
Feb 5, 2020
e9434ee Remove false positive GCC warning (Hennadii Stepanov) Pull request description: On master (f05c1ac) GCC compiler fires a false positive `-Wmaybe-uninitialized`: ``` wallet/wallet.cpp: In static member function ‘static std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain&, const WalletLocation&, std::__cxx11::string&, std::vector<std::__cxx11::basic_string<char> >&, uint64_t)’: wallet/wallet.cpp:3913:27: warning: ‘*((void*)& time_first_key +8)’ may be used uninitialized in this function [-Wmaybe-uninitialized] Optional<int64_t> time_first_key; ^~~~~~~~~~~~~~ ``` The same as #15292. This PR leverages a workaround and removes the warning. ACKs for top commit: laanwj: ACK e9434ee, removes the warning for me (gcc 7.4.0) kristapsk: ACK e9434ee Tree-SHA512: 8820a8ba6a75aa6b1ac675a38c883a77f12968b010533b6383180aa66e7e0d570bf6300744903ead91cf9084e5345144959cd6b0cea1b763190b8dd49bacce75
|
Looks like we got a bonus semicolon |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Feb 9, 2020
e9434ee Remove false positive GCC warning (Hennadii Stepanov) Pull request description: On master (f05c1ac) GCC compiler fires a false positive `-Wmaybe-uninitialized`: ``` wallet/wallet.cpp: In static member function ‘static std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain&, const WalletLocation&, std::__cxx11::string&, std::vector<std::__cxx11::basic_string<char> >&, uint64_t)’: wallet/wallet.cpp:3913:27: warning: ‘*((void*)& time_first_key +8)’ may be used uninitialized in this function [-Wmaybe-uninitialized] Optional<int64_t> time_first_key; ^~~~~~~~~~~~~~ ``` The same as bitcoin#15292. This PR leverages a workaround and removes the warning. ACKs for top commit: laanwj: ACK e9434ee, removes the warning for me (gcc 7.4.0) kristapsk: ACK e9434ee Tree-SHA512: 8820a8ba6a75aa6b1ac675a38c883a77f12968b010533b6383180aa66e7e0d570bf6300744903ead91cf9084e5345144959cd6b0cea1b763190b8dd49bacce75
jasonbcox
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Oct 10, 2020
…oops Summary: Add wallet logic for dealing with multiple ScriptPubKeyMan instances. This doesn't change current behavior because there is still only a single LegacyScriptPubKeyMan. But in the future the new logic will be used to support descriptor wallets. --- bitcoin/bitcoin@c729afd Note: Had to bring in [[bitcoin/bitcoin#18052 | PR18052]] to fix an instance of -Wmaybe-uninitialized Depends on D7858 Partial backport of Core [[bitcoin/bitcoin#17261 | PR17261]] and [[bitcoin/bitcoin#18052 | PR18052]] Test Plan: ninja all check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7859
sidhujag
pushed a commit
to syscoin-core/syscoin
that referenced
this pull request
Nov 10, 2020
e9434ee Remove false positive GCC warning (Hennadii Stepanov) Pull request description: On master (f05c1ac) GCC compiler fires a false positive `-Wmaybe-uninitialized`: ``` wallet/wallet.cpp: In static member function ‘static std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain&, const WalletLocation&, std::__cxx11::string&, std::vector<std::__cxx11::basic_string<char> >&, uint64_t)’: wallet/wallet.cpp:3913:27: warning: ‘*((void*)& time_first_key +8)’ may be used uninitialized in this function [-Wmaybe-uninitialized] Optional<int64_t> time_first_key; ^~~~~~~~~~~~~~ ``` The same as bitcoin#15292. This PR leverages a workaround and removes the warning. ACKs for top commit: laanwj: ACK e9434ee, removes the warning for me (gcc 7.4.0) kristapsk: ACK e9434ee Tree-SHA512: 8820a8ba6a75aa6b1ac675a38c883a77f12968b010533b6383180aa66e7e0d570bf6300744903ead91cf9084e5345144959cd6b0cea1b763190b8dd49bacce75
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On master (f05c1ac) GCC compiler fires a false positive
-Wmaybe-uninitialized:The same as #15292.
This PR leverages a workaround and removes the warning.