Test and enabled -Wshadow
by default, add developer note about this change (see #8105).
As my native language is not English, I’m open to suggestions.
[Edits from maintainers allowed for easier cooperation.]
Test and enabled -Wshadow
by default, add developer note about this change (see #8105).
As my native language is not English, I’m open to suggestions.
[Edits from maintainers allowed for easier cooperation.]
330@@ -331,6 +331,31 @@ Strings and formatting
331
332 - *Rationale*: Bitcoin Core uses tinyformat, which is type safe. Leave them out to avoid confusion
333
334+Variable names
335+--------------
336+
337+The shadowing warning (`-Wshadow`) is enabled by default. Please name
utACK. At this moment, though, this still generates 3406 warnings in the process of the build:
0$ grep Wshadow /tmp/log|wc
1 3406 30643 458032
I don’t think this number needs to be 0 before merging this, but it does needs to be a manageable number to avoid ‘shadowing’ other warnings and errors, as well as increasing the Travis output by a thousandfold.
Definitely. This has to wait.
There are other PRs open, serialization changes has to be merged, and I still have to PR txmempool, main, wallet, torcontroller and tests changes.
grep "warning: declaration shadows"
somewhere for me? Or at least present something like ... | sort | uniq -c | sort -rn | head
;-)
@paveljanik Sure: https://dev.visucore.com/bitcoin/tmp/log.gz
I think what is left is nearly all serialization related, certainly the ones that appear many times.
Yes, thanks for testing @fanquake. I can confirm the same with LLVM 4.0 (git master, empty ccache) on Linux.
As #9039 is merged this is ready for merge after the squashme is squashed (done).
#8808 and the shadow warning in leveldb doesn’t need to be a blocker, the reason for holding this off was the warning spam for every single file and that’s gone now.
Will also try this with gcc just to be sure (done).