gui: Remove needless GCC diagnostic pragma #16738

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20190827-gcc-pragmas changing 1 files +0 −4
  1. hebasto commented at 7:48 PM on August 27, 2019: member

    Some tests on different platforms make me believe that some GCC diagnostic pragmas are needless: no additional warnings are generated with this PR.

  2. MarcoFalke commented at 8:06 PM on August 27, 2019: member

    When were they introduced?

  3. hebasto commented at 8:18 PM on August 27, 2019: member

    @MarcoFalke

    When where they introduced?

    #9758 by @jonasschnelli

  4. DrahtBot added the label Build system on Aug 27, 2019
  5. DrahtBot added the label GUI on Aug 27, 2019
  6. DrahtBot commented at 10:32 PM on August 27, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  7. promag commented at 11:40 PM on August 27, 2019: member

    ACK 096fd9a1b9f8f9d1cac872a04deca90b9c0144b8, no warning is generated.

    Also checked that if the following is removed https://github.com/bitcoin/bitcoin/blob/a7be1cc92be4946c4f042bccd3a1b007657f3241/src/bitcoind.cpp#L143 then

    bitcoind.cpp:148:17: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
                if (daemon(1, 0)) { // don't chdir (1), do close FDs (0)
                    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/stdlib.h:293:6: note: 'daemon' has been explicitly marked deprecated here
    int      daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
             ^
    1 warning generated.
    
  8. MarcoFalke renamed this:
    build: Remove needless GCC diagnostic pragmas
    gui: Remove needless GCC diagnostic pragmas
    on Aug 28, 2019
  9. MarcoFalke added the label Refactoring on Aug 28, 2019
  10. DrahtBot added the label Needs rebase on Sep 1, 2019
  11. hebasto force-pushed on Sep 1, 2019
  12. DrahtBot removed the label Needs rebase on Sep 1, 2019
  13. fanquake commented at 6:28 AM on September 2, 2019: member

    These pragmas suppress warnings if you're compiling on macOS 10.10 (which we still currently support). i.e if (with this change) you drop the MAC_OS_X_VERSION_MIN_REQUIRED <= 101100 check from

    https://github.com/bitcoin/bitcoin/blob/7d6f63cc2c2b9c4f07a43619eef0b7314474fffd/src/qt/guiutil.cpp#L695

    you'll see:

    warning: 'LSSharedFileListItemCopyResolvedURL' is deprecated: first deprecated in macOS 10.11 [-Wdeprecated-declarations]
    warning: 'kLSSharedFileListSessionLoginItems' is deprecated: first deprecated in macOS 10.11 - Use a LaunchAgent, XPCService or the ServiceManagement APIs instead. [-Wdeprecated-declarations]
    warning: 'LSSharedFileListCopySnapshot' is deprecated: first deprecated in macOS 10.11 - This functionality is no longer supported on OS X.
    ...
    

    I'd rather we just drop the pragams the same time that we drop all of the 10.10 related startup code (hopefully post v0.19.0).

  14. hebasto commented at 9:01 AM on September 2, 2019: member

    @fanquake

    I'd rather we just drop the pragams the same time that we drop all of the 10.10 related startup code (hopefully post v0.19.0).

    So, let's wait for #16392 get merged.

  15. laanwj added this to the milestone 0.20.0 on Sep 5, 2019
  16. jonasschnelli commented at 7:07 AM on October 10, 2019: contributor

    I think #16392 won't fix the OSX deprecation warnings (but would allow to remove some of that code). IMO better to keep the pragmas for now.

  17. laanwj removed this from the milestone 0.20.0 on Oct 10, 2019
  18. laanwj commented at 1:16 PM on October 10, 2019: member

    Removed the 0.20 milestone.

  19. in src/qt/paymentrequestplus.h:8 in b5fd7ab2e4 outdated
       4 | @@ -5,10 +5,7 @@
       5 |  #ifndef BITCOIN_QT_PAYMENTREQUESTPLUS_H
       6 |  #define BITCOIN_QT_PAYMENTREQUESTPLUS_H
       7 |  
       8 | -#pragma GCC diagnostic push
       9 | -#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
      10 |  #include <qt/paymentrequest.pb.h>
    


    laanwj commented at 11:02 AM on October 23, 2019:

    at least this one will go with #17165


    hebasto commented at 1:33 PM on October 28, 2019:

    #17165 is merged now.

  20. DrahtBot added the label Needs rebase on Oct 26, 2019
  21. build: Remove needless GCC diagnostic pragmas d35915b6aa
  22. hebasto force-pushed on Oct 26, 2019
  23. hebasto commented at 7:07 PM on October 26, 2019: member

    Rebased. @jonasschnelli

    I think #16392 won't fix the OSX deprecation warnings...

    On master warnings are generated only on OS X 10.10 Yosemite and OS X 10.11 El Capitan.

  24. DrahtBot removed the label Needs rebase on Oct 26, 2019
  25. laanwj renamed this:
    gui: Remove needless GCC diagnostic pragmas
    gui: Remove needless GCC diagnostic pragma
    on Nov 4, 2019
  26. fanquake commented at 2:11 AM on November 23, 2019: member

    Closing in favour of #17567, where I'm proposing to remove these and the related code entirely.

  27. fanquake closed this on Nov 23, 2019

  28. hebasto deleted the branch on Nov 23, 2019
  29. DrahtBot locked this on Dec 16, 2021

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-21 18:14 UTC

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