Closed cmihai closed 5 years ago
Are there any difficulties to fix the actual warning instead? Even well test covered code could flake because of uninitialized variables.
The code is not any different in bitcoin. So I guess the warning is supressed in bitcoin differently, yet the code is the same. It does not look beneficial to me to change prevector from what bitcoin is having, except it was done also on bitcoin.
https://github.com/bitcoin/bitcoin/pull/14028 is what Bitcoin does. Their code landed in 0.18, probably, so we could just close this PR and cherry-pick their commit.
Yeah I suggest cherry-pick their commit. It's interesting that they went exactly the same path: suppress warning (https://github.com/bitcoin/bitcoin/pull/13902), and then fix them instead (https://github.com/bitcoin/bitcoin/pull/14028)
I cherry-picked their commit. After Travis finishes, it will need to be regular-merged into master.
utACK 142eec4621486d919700a2a6ecfd0ed8c38a40aa
Please make sure to update PR description as well as commit message. This should go as merge-commit, right?
This PR cherry-picks a Bitcoin commit which fixes GCC's
-Wmaybe-uninitialized
for a couple of methods in prevector.h.