Need to suppress compiler warnings in generated code from clang on macOS #61

issue ryanofsky opened this issue on December 17, 2021
  1. ryanofsky commented at 9:03 PM on December 17, 2021: collaborator

    Reported https://github.com/bitcoin/bitcoin/pull/10102#pullrequestreview-827293918 by @Sjors

    When building on macOS, using capnp 0.9.1 via homebrew and chaincodelabs/libmultiprocess@34ce921, I get flooded with warnings like this:

    ./interfaces/chain.h:227:18: note: overridden virtual function is here
        virtual void initWarning(const bilingual_str& message) = 0;
                     ^
    In file included from ipc/capnp/node.cpp:9:
    In file included from ./ipc/capnp/node-types.h:11:
    In file included from ./ipc/capnp/wallet.capnp.proxy-types.h:6:
    In file included from ./ipc/capnp/wallet.capnp.proxy.h:7:
    In file included from ./ipc/capnp/wallet.h:9:
    ./ipc/capnp/chain.capnp.proxy.h:1414:26: warning: 'initError' overrides a member function but is not marked 'override' [-Wsuggest-override]
        typename M35::Result initError(M35::Param<0> message);
    

    Also a bunch of these:

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:2644:9: warning: destructor called on non-final 'mp::ProxyClient<ipc::capnp::messages::NotifyHeaderTipCallback>' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
            __get_elem()->~_Tp();
    
  2. ryanofsky commented at 9:07 PM on December 17, 2021: collaborator

    I'm not sure about the virtual destructor warnings. That seems bad and potentially there is a real bug or leak there.

    The override warnings probably need a fix like #40 that was made to fix the same issue in GCC

  3. ryanofsky referenced this in commit 921e23e8d1 on Dec 22, 2021
  4. ryanofsky referenced this in commit 5738b8ae09 on Dec 22, 2021
  5. ryanofsky referenced this in commit 306c8b100d on Dec 22, 2021
  6. ryanofsky commented at 2:20 AM on December 22, 2021: collaborator

    I was able to reproduce basically the same warnings with clang 13.0.0 on linux and added fixes in #62. Thanks for reporting!

  7. ryanofsky closed this on Dec 22, 2021

  8. bitcoin-core locked this on Jun 25, 2025
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 18:30 UTC

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