LevelDB warnings under macOS 10.12 #9096

issue droark opened this issue on November 7, 2016
  1. droark commented at 5:15 PM on November 7, 2016: contributor

    Hello. I noticed that there are a lot of repeated warnings when compiling Core under macOS (formerly OS X) 10.12. Here are a couple of examples.

    In file included from leveldb/util/cache.cc:10:
    In file included from ./leveldb/port/port.h:14:
    In file included from ./leveldb/port/port_posix.h:47:
    ./leveldb/port/atomic_pointer.h:55:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use
          std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
      OSMemoryBarrier();
      ^
    /usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
    void    OSMemoryBarrier( void );
            ^
    
    leveldb/util/logging.cc:58:40: warning: comparison of integers of different signs: 'const int' and 'unsigned long long' [-Wsign-compare]
              (v == kMaxUint64/10 && delta > kMaxUint64%10)) {
                                     ~~~~~ ^ ~~~~~~~~~~~~~
    

    The second warning seems relatively harmless. The first worries me a little bit, though. Does anybody know offhand if this has been fixed upstream, and if it should be pulled down? I suppose the problem is that I don't know what the policy is towards warnings in Core. At an old company, warnings in our code were treated like errors, while third-party code was left alone whenever possible. (Removing all the warnings from millions of lines of code just isn't feasible.)

    Thanks.

    EDIT: Latest version still has the problem. Looks like somebody has pointed this out to the team. I'll see if I can get a PR filed and get things sped up a bit.

    EDIT 2: I filed a patch.

  2. fanquake added the label MacOSX on Nov 8, 2016
  3. fanquake added the label Upstream on Nov 8, 2016
  4. fanquake commented at 1:59 AM on August 13, 2017: member

    Should be fixed after #10958.

  5. fanquake closed this on Aug 13, 2017

  6. DrahtBot locked this on Sep 8, 2021
Contributors

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 00:15 UTC

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