Remove unused variables #8590

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1608-unusedCode changing 4 files +2 −6
  1. MarcoFalke commented at 1:05 PM on August 25, 2016: member

    This removes the remaining unused variables outside of src/test.

  2. Remove unused variables fa6dc9f0e5
  3. MarcoFalke added the label Refactoring on Aug 25, 2016
  4. MarcoFalke added the label Docs and Output on Aug 25, 2016
  5. btcdrak commented at 4:10 PM on August 25, 2016: contributor

    ACK fa6dc9f

  6. laanwj commented at 10:21 AM on August 26, 2016: member

    Thanks, utACK

    Just out of curiosity: what did you use to find these?

  7. 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.

  8. 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...

  9. 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'.

  10. laanwj merged this on Aug 26, 2016
  11. laanwj closed this on Aug 26, 2016

  12. laanwj referenced this in commit 12892dbb9f on Aug 26, 2016
  13. fanquake commented at 11:24 AM on August 26, 2016: member

    utACK fa6dc9f

  14. MarcoFalke deleted the branch on Aug 27, 2016
  15. codablock referenced this in commit cda6bb564c on Sep 19, 2017
  16. codablock referenced this in commit 93eb1de916 on Jan 9, 2018
  17. codablock referenced this in commit 95c61637d5 on Jan 9, 2018
  18. andvgal referenced this in commit 80a7ee9d63 on Jan 6, 2019
  19. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me