-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Enable and fix most compilation warnings #1104
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
…s a class [-Wmismatched-tags]
…n-virtual destructor [-Wdelete-non-virtual-dtor]
ACK |
ACK, good work cleaning all that up |
jgarzik
pushed a commit
that referenced
this pull request
Apr 15, 2012
Enable and fix most compilation warnings
coblee
pushed a commit
to litecoin-project/litecoin
that referenced
this pull request
Jul 17, 2012
Enable and fix most compilation warnings
suprnurd
pushed a commit
to chaincoin-legacy/chaincoin
that referenced
this pull request
Dec 5, 2017
lateminer
pushed a commit
to lateminer/bitcoin
that referenced
this pull request
Jan 22, 2019
[PORT] Simple HD wallet
lateminer
pushed a commit
to lateminer/bitcoin
that referenced
this pull request
Nov 14, 2019
0672c46 [Trivial][GUI] Fix typos in welcome widget (random-zebra) Pull request description: One-liner in welcomecontentwidget.ui. Closes PIVX-Project#1101 . (As a non-native speaker, I think "whomever" is correct as it refers to the object of the sentence, not the subject). ACKs for top commit: Fuzzbawls: ACK 0672c46 Tree-SHA512: 24a6416344564eb27c53cc7d77bfa7245a44bd34ee7a6ccb051b6ee843c69b48cecd8245614ffd2ac73b3888603edfa96f17e7559d51c971db5b8b2ed4d076c5
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.
This pull request enables most compilation warnings (of -Wall -Wextra) and fixes them. I compiled bitcoin-qt with g++ and clang to have as much warning coverage as possible. Warning flags in bitcoin-qt and bitcoind build have been equalized.
char-subscripts
warnings were especially dangerous, as char can be negative, resulting in accesses outside the array and thus potential information leakage. Fixed this by adding (unsigned char).I've left these warnings alone:
invalid-offsetof
: Looked this up, and found http://stackoverflow.com/questions/1129894/why-cant-you-use-offsetof-on-non-pod-strucutures-in-cWe use none of the special C++ multi-inheritance and dynamic casting so using
offsetof
should be safe.sign-compare
: There's just too darn many of 'em. These could be worth checking later, as wrong signed-unsigned comparisons can result in nasty bugs.unused-parameter
: Also way too many instances. And ignoring a parameter is no problem, usually.I have carefully seperated this into commits for each separate warning class to make review easy.