I’m working on enabling -Wshadow
in our builds (#8105).
This is a test. Do we prefer changes like this? Or different name changes (like req
-> reqIn
instead of _req
)? Both styles are used in the source…
I’m working on enabling -Wshadow
in our builds (#8105).
This is a test. Do we prefer changes like this? Or different name changes (like req
-> reqIn
instead of _req
)? Both styles are used in the source…
ConceptACK.
_<var>
and varIn
, the latter is more explicit but seems like it has more potential for actual overlap with an existing variable name.
@laanwj Sure, but…? It is valid C++ but can hide problems.
But I do not have a problem when we say we do not need/want -Wshadow
…
I slightly prefer _var
.
Is this enough to allow enabling the -fshadow
warnings afterwards? Or are there remaining cases of shadowing? I’d like to do this in one pull/project as much as possible, to avoid intermediate pulls introducing new problems here.
(as this is a trivial change, and we want to do this, let’s just get it over with)
We use shadowing in many files.
You can see a preview/WIP here: https://github.com/bitcoin/bitcoin/compare/master...paveljanik:20160526_Wshadow?expand=1
This is not doable (or at least reviewable) in one PR IMO.
Whoa. That is kind of scary much, looks like a lot more work than I estimated it as.
To be honest I don’t know how to handle a code change on that scale sanely.
But as the changes are all similar, I do still think it’s less overhead to review in one go, than having 100 pulls that change this for one class at a time.
I can group pieces together in say 5 PRs. But still, this is not completely solved yet or some changes are too intrusive. And this is not needed to fix immediately. Thus I’d prefer separate PRs (with the help from others/part maintainers).
And yes, I too don’t know how to handle a code change on that scale sanely. But what I know exactly is I do not want to do that in one PR ;-)
For something like this it’d be ideal to be able to do it mechanically and deterministically. Then people could review the script making the change and replicate the changes. My clang-fu doesn’t go that far though.
Otherwise, I agree, the best possibly is probably separate commits for separate parts of the code (GUI, RPC, etc).
because there could be BUGS in the code
Sure, though I think fixing BUGS should be separate from the pure refactoring step, which may make these BUGS apparent.
c9cf1b9 gives the same binaries as c9cf1b9~1, so I am assuming there are no BUGS added nor any BUGS removed.
utACK c9cf1b9