refactor: Remove spurious virtual from final ~CZMQNotificationInterface #32187

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2504-refactor-virtual changing 1 files +2 −2
  1. maflcko commented at 4:51 PM on April 1, 2025: member

    virtual does not make sense here, because:

    • The class is final, thus the destructor isn't overridden in a derived class
    • The destructor also isn't overriding the destructor of the base, clarified in commit 2b3ea39de40bc7754cab558245e4ddac1b261750
    • Clang 21 may warn about this
    src/zmq/zmqnotificationinterface.h:25:13: error: virtual method '~CZMQNotificationInterface' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
       25 |     virtual ~CZMQNotificationInterface();
          |             ^
    

    Fix all issues by removing it.

  2. refactor: Remove spurious virtual from final ~CZMQNotificationInterface fa69c42fdf
  3. DrahtBot commented at 4:51 PM on April 1, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32187.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK janb84, TheCharlatan, davidgumberg

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Refactoring on Apr 1, 2025
  5. maflcko commented at 6:36 PM on April 1, 2025: member

    (ci failure can be ignored and is unrelated, see #32184)

  6. janb84 commented at 6:41 PM on April 1, 2025: contributor

    ACK fa69c42

    The change is not crucial, but it makes the code more precise and has additional benefits.

    • Code review ✅
    • Run tests ✅
    • More extensive fuzzer run because of CI failures ✅
  7. sedited approved
  8. sedited commented at 7:13 PM on April 1, 2025: contributor

    ACK fa69c42fdf0aeec0546e951bc6132ab630edb9d4

  9. fanquake merged this on Apr 2, 2025
  10. fanquake closed this on Apr 2, 2025

  11. maflcko deleted the branch on Apr 2, 2025
  12. hebasto commented at 9:20 AM on April 2, 2025: member
    • Clang 21 may warn about this
    src/zmq/zmqnotificationinterface.h:25:13: error: virtual method '~CZMQNotificationInterface' is inside a 'final' class and can never be overridden [-Werror,-Wunnecessary-virtual-specifier]
       25 |     virtual ~CZMQNotificationInterface();
          |             ^
    

    Does Clang 21 have this warning enabled? Asking because I can't see warnings in https://github.com/hebasto/bitcoin-core-nightly/actions/workflows/clang.yml.

  13. maflcko commented at 9:22 AM on April 2, 2025: member

    Does Clang 21 have this warning enabled? Asking because I can't see warnings in https://github.com/hebasto/bitcoin-core-nightly/actions/workflows/clang.yml.

    It ran 6 hours ago, but this pull was merged 7 hours ago. Thus, if you want to test it with clang-21, you'll have to revert the pull first.

  14. hebasto commented at 9:26 AM on April 2, 2025: member

    Does Clang 21 have this warning enabled? Asking because I can't see warnings in https://github.com/hebasto/bitcoin-core-nightly/actions/workflows/clang.yml.

    It ran 6 hours ago, but this pull was merged 7 hours ago. Thus, if you want to test it with clang-21, you'll have to revert the pull first.

    This one run @ 74d9598bfbc24c3b7bfe1dad5bf9d988381bf893.

  15. maflcko commented at 9:42 AM on April 2, 2025: member

    I don't know, but it is possibly before clang enabled the warning by default? I tested Ubuntu clang version 21.0.0 (++20250331082744+4e8fbc60710e-1~exp1~20250331202915.820)

    My recommendation would be to just test on a fresh install of everything, if you want to test this.

    I can take a look, if it fails to reproduce.

  16. hebasto commented at 10:51 AM on April 2, 2025: member

    The warning has been reproduced for Ubuntu clang version 21.0.0 (++20250401083335+9e5bfbf77db0-1~exp1~20250401083447.821): https://github.com/hebasto/bitcoin-core-nightly/actions/runs/14217750729/job/39838245769.

    Post-merge ACK fa69c42fdf0aeec0546e951bc6132ab630edb9d4.

  17. fanquake referenced this in commit f1d1b85efa on Apr 17, 2025
  18. fanquake referenced this in commit 2d6c14efba on Apr 17, 2025
  19. sedited referenced this in commit a9c46ce3c3 on Apr 24, 2025
  20. fanquake referenced this in commit 3dbd2b3d17 on May 6, 2025
  21. fanquake referenced this in commit a124b91339 on May 13, 2025
  22. fanquake referenced this in commit 418bee8f9d on May 13, 2025
  23. fanquake referenced this in commit 589b56192f on May 22, 2025
  24. stickies-v referenced this in commit 772a33e052 on May 23, 2025
  25. luke-jr referenced this in commit 816e891b09 on Jun 6, 2025
  26. fanquake referenced this in commit 39b935a8d4 on Jun 9, 2025
  27. yuvicc referenced this in commit 069643f094 on Jul 6, 2025
  28. bug-castercv502 referenced this in commit 5b0af4b944 on Sep 28, 2025
  29. Fabcien referenced this in commit 5ea4c4e325 on Dec 9, 2025
  30. morozow referenced this in commit 7d61e5b073 on May 8, 2026
  31. morozow referenced this in commit f7a19fccb4 on May 8, 2026
  32. morozow referenced this in commit b49b8232c6 on May 8, 2026
  33. morozow referenced this in commit edc6b10728 on May 8, 2026
  34. morozow referenced this in commit 1e13d1d0b9 on May 8, 2026
  35. morozow referenced this in commit c0a637fe80 on May 8, 2026
  36. roqqit referenced this in commit 4c4d802a77 on Jun 5, 2026
  37. Kino1994 referenced this in commit 6e133d7c02 on Jun 28, 2026
  38. BigcoinBGC referenced this in commit 22898baa06 on Jun 30, 2026
  39. bitcoin locked this on Jul 30, 2026

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-08-01 14:51 UTC

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