Remove false positive GCC warning #18052

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20200201-false-positive-warning changing 1 files +3 −1
  1. hebasto commented at 9:16 pm on February 1, 2020: member

    On master (f05c1ac444e0c893516535bfdf07c5c8cd9bce16) GCC compiler fires a false positive -Wmaybe-uninitialized:

    0wallet/wallet.cpp: In static member function static std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain&, const WalletLocation&, std::__cxx11::string&, std::vector<std::__cxx11::basic_string<char> >&, uint64_t):
    1wallet/wallet.cpp:3913:27: warning: *((void*)& time_first_key +8) may be used uninitialized in this function [-Wmaybe-uninitialized]
    2         Optional<int64_t> time_first_key;
    3                           ^~~~~~~~~~~~~~
    

    The same as #15292.

    This PR leverages a workaround and removes the warning.

  2. Remove false positive GCC warning e9434ee03e
  3. hebasto requested review from achow101 on Feb 1, 2020
  4. fanquake added the label Wallet on Feb 1, 2020
  5. kristapsk approved
  6. kristapsk commented at 1:19 am on February 2, 2020: contributor
    ACK e9434ee03efdfc0a5a54cf46561e95fd93cba007
  7. DrahtBot commented at 3:25 am on February 2, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  8. laanwj commented at 1:43 pm on February 5, 2020: member
    ACK e9434ee03efdfc0a5a54cf46561e95fd93cba007, removes the warning for me (gcc 7.4.0)
  9. laanwj referenced this in commit b30a1f3e39 on Feb 5, 2020
  10. laanwj merged this on Feb 5, 2020
  11. laanwj closed this on Feb 5, 2020

  12. hebasto deleted the branch on Feb 5, 2020
  13. ddustin commented at 10:17 pm on February 5, 2020: none
    Looks like we got a bonus semicolon
  14. sidhujag referenced this in commit 7b273400f2 on Feb 9, 2020
  15. jasonbcox referenced this in commit e37acaefee on Oct 10, 2020
  16. sidhujag referenced this in commit 3f4c6b911e on Nov 10, 2020
  17. DrahtBot locked this on Feb 15, 2022

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: 2024-07-03 10:13 UTC

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