wallet: Remove unused local variable old_label #14117

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:remove-unused-local-variable changing 1 files +0 −1
  1. practicalswift commented at 6:53 AM on August 31, 2018: contributor

    Remove unused local variable old_label.

    Last use was removed in #13825.

  2. wallet: Remove unused local variable old_label 0e5ac7eb40
  3. fanquake added the label Wallet on Aug 31, 2018
  4. fanquake commented at 7:02 AM on August 31, 2018: member

    I’m curious to know why these don’t get picked up during review, instead of always “just after” a PR has been merged? If there is a too being used, can it be run on the PRs?

  5. practicalswift commented at 8:50 AM on August 31, 2018: contributor

    @fanquake I do quite a lot of checking using various automated jobs, this includes: custom linting, running static analysers on the code base, running tests under dynamic analysers, spell checking of documentation, compiling under various compilers with a wide range of warning flags enabled, etc, etc. These jobs currently run only against master due to resource limitations.

    Ideally these checks would run in Travis (assuming the false positive rate is near zero and the runtime is low): that would make sure these issues don't reach master, solve the resource limitations and keep the entire process automated. Could it be better? :-)

    In order to catch a larger proportion of these issues pre-merge please help reaching that goal by taking a few minutes to review some of these open PRs of mine:

    • To allow for automated thread safety checking (-Wthread-safety-analysis) under Travis: please help by reviewing #11634, #11652, #13115, #13123, #13128, #14108 and the tracking issue #13129
    • To allow for automated detection of accidentally ignored return values ([[nodiscard]]) under Travis: please help by reviewing #13864 and #13815
    • To allow for automated integer overflow/wraparound checking (-fsanitize=integer) under Travis: please help by reviewing #11535 and #11551
    • To allow for automated spell checking (codespell) under Travis: please help by reviewing #13954
    • To allow for automated checking of Doxygen comments (-Wdocumentation) under Travis: please help by reviewing #13914
    • To allow for automated detection of general issues – please help increase signal to noise by fixing/avoiding compiler warnings or static analyzer warnings (by fixing the cause of the warning at hand or by simply guiding the static analyzers better): please help by reviewing #14117 (this PR), #14094, #14088, #13969, #13909, #13897, #13548, #13766, #13546, #13392, #13382 and #13249.
    • To improve the linting/fuzzing/testing infrastructure in general: please help by reviewing #14092, #14010 and #14115

    Thanks for helping out!

    The C++ Core Guidelines sum up my view on the benefits of mechanical checking over human reviewing for this subclass of issues:

    Enforcement might be done by code review, by static analysis, by compiler, or by run-time checks. Wherever possible, we prefer “mechanical” checking (humans are slow, inaccurate, and bore easily) and static checking.

  6. laanwj commented at 11:27 AM on August 31, 2018: member

    I’m curious to know why these don’t get picked up during review, instead of always “just after” a PR has been merged? If there is a too being used, can it be run on the PRs?

    IMO, it would make more sense to do a periodical PR that cleans up these things, grouped together, instead of "just after" a PR.

    There's really no hurry to get rid of an unused local variable, no need to immediately open a PR.

    We've discussed this before.

  7. MarcoFalke commented at 12:12 PM on August 31, 2018: member

    Agree with @laanwj. If there was a way to make travis yell at you when there is a "unused local variable" or $some_other_non_critical_but_should_be_cleaned_up_before_the_next_major_release_style_issue, then fix them immediately on master if they slip in for whatever reason.

    Otherwise a monthly pull request with all minor fixes (or one right before branch-off every six months) should be enough. Note that you can always keep a local master branch with all you fixes, so that your automated jobs are happy during that time.

  8. promag commented at 11:04 PM on August 31, 2018: member

    utCAK 0e5ac7e.

    Agree with the batch cleanup.

    We could add a GH label specific to "request" @practicalswift analysis so he can filter those?

  9. fanquake commented at 8:21 AM on September 2, 2018: member

    This can be combined into #14094, as both are removing unused variables.

  10. fanquake closed this on Sep 2, 2018

  11. practicalswift deleted the branch on Apr 10, 2021
  12. bitcoin locked this on Aug 18, 2022
Labels
Linked (view graph)
#11535 Avoid unintentional unsigned integer wraparounds#11551 Fix unsigned integer wrap-around in GetBlockProofEquivalentTime#11634 wallet: Add missing cs_wallet/cs_KeyStore locks to wallet#11652 Add missing locks: validation.cpp + related#13115 addrman: Add Clang thread safety annotations for variables guarded by CAddrMan.cs#13123 net: Add Clang thread safety annotations for guarded variables in the networking code#13128 policy: Add Clang thread safety annotations for variables guarded by cs_feeEstimator#13129 Meta-issue: Add Clang thread safety analysis annotations#13249 Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.#13382 util: Don't throw in GetTime{Millis,Micros}(). Mark as noexcept.#13392 util: Make strprintf noexcept. Improve error message on format string error.#13546 wallet: Fix use of uninitialized value bnb_used in CWallet::CreateTransaction(...)#13548 Document assumptions made in PeerLogicValidation::SendMessages(...) and rescanblockchain(...)#13766 Prefer initialization to assignment in constructors. Prefer in-class initializers to member initializers in constructors for constant initializers.#13815 util: Add [[nodiscard]] to all {Decode,Parse}[...](...) functions returning bool#13825 [wallet] Kill accounts#13864 validation: Document where we are intentionally ignoring bool return values from validation related functions#13897 clientversion: Define only macros we’ll use#13909 validation: Pass chainparams in AcceptToMemoryPoolWorker(...)#13914 build: Enable -Wdocumentation (clang) if available#13954 Warn (don't fail!) on spelling errors. Fix typos reported by codespell.#13969 Make sure all callers of LookupBlockIndex(...) check for nullptr before dereferencing (CBlockIndex*)#14010 tests: Setup chain parameters (globalChainParams) when performing fuzzing initialization#14088 tests: Don't assert(...) with side effects#14092 tests: Dry run bench_bitcoin as part "make check" to allow for quick identification of assertion/sanitizer failures in benchmarking code#14094 refactoring: Remove unreferenced local variables#14108 tests: Add missing locking annotations and locks (g_cs_orphans)#14115 lint: Make all linters work under the default macOS dev environment (build-osx.md)

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-05-20 06:54 UTC