This removes the remaining unused variables outside of src/test.
Remove unused variables #8590
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1608-unusedCode changing 4 files +2 −6-
MarcoFalke commented at 1:05 PM on August 25, 2016: member
-
Remove unused variables fa6dc9f0e5
- MarcoFalke added the label Refactoring on Aug 25, 2016
- MarcoFalke added the label Docs and Output on Aug 25, 2016
-
paveljanik commented at 1:16 PM on August 25, 2016: contributor
-
btcdrak commented at 4:10 PM on August 25, 2016: contributor
ACK fa6dc9f
-
laanwj commented at 10:21 AM on August 26, 2016: member
Thanks, utACK
Just out of curiosity: what did you use to find these?
-
MarcoFalke commented at 10:41 AM on August 26, 2016: member
@laanwj I was looking into cppcheck and cpplint the last days. It was trivial to set up. According to the tools, those are the last unused variables.
Also, they found a ton of unused functions, but I couldn't find anything that deserves attention. E.g. DeleteAuthCookie is unused, but there is no point in removing the code. Almost all unused functions potentially turn out to be useful in the future.
Finally, cppcheck returned some errors and warnings but my knowledge of cpp is too low. So they could very well be false positives.
-
MarcoFalke commented at 10:45 AM on August 26, 2016: member
<sub>It would probably be fun to set up a GitHub bot account which scans each pull request and then spams all the code nits in the appropriate lines in the code...
-
laanwj commented at 11:23 AM on August 26, 2016: member
@laanwj I was looking into cppcheck and cpplint the last days. It was trivial to set up. According to the tools, those are the last unused variables.
Thanks, I'll check them out. I think I've had cppcheck installed at some point, but kind of forgot about it.
E.g. DeleteAuthCookie is unused, but there is no point in removing the code.
Yes sometimes a half of a [create,remove] pair that really belongs together is unused, this is one example. More an indication of 'this needs tests' than 'this code needs to be removed'.
- laanwj merged this on Aug 26, 2016
- laanwj closed this on Aug 26, 2016
- laanwj referenced this in commit 12892dbb9f on Aug 26, 2016
-
fanquake commented at 11:24 AM on August 26, 2016: member
utACK fa6dc9f
- MarcoFalke deleted the branch on Aug 27, 2016
- codablock referenced this in commit cda6bb564c on Sep 19, 2017
- codablock referenced this in commit 93eb1de916 on Jan 9, 2018
- codablock referenced this in commit 95c61637d5 on Jan 9, 2018
- andvgal referenced this in commit 80a7ee9d63 on Jan 6, 2019
- MarcoFalke locked this on Sep 8, 2021