Some tests on different platforms make me believe that some GCC diagnostic pragmas are needless: no additional warnings are generated with this PR.
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-
hebasto commented at 7:48 PM on August 27, 2019: member
-
MarcoFalke commented at 8:06 PM on August 27, 2019: member
When were they introduced?
-
hebasto commented at 8:18 PM on August 27, 2019: member
- DrahtBot added the label Build system on Aug 27, 2019
- DrahtBot added the label GUI on Aug 27, 2019
-
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.
-
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. - MarcoFalke renamed this:
build: Remove needless GCC diagnostic pragmas
gui: Remove needless GCC diagnostic pragmas
on Aug 28, 2019 - MarcoFalke added the label Refactoring on Aug 28, 2019
- DrahtBot added the label Needs rebase on Sep 1, 2019
- hebasto force-pushed on Sep 1, 2019
- DrahtBot removed the label Needs rebase on Sep 1, 2019
-
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 <= 101100check fromyou'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). - laanwj added this to the milestone 0.20.0 on Sep 5, 2019
-
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.
- laanwj removed this from the milestone 0.20.0 on Oct 10, 2019
-
laanwj commented at 1:16 PM on October 10, 2019: member
Removed the 0.20 milestone.
-
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>
DrahtBot added the label Needs rebase on Oct 26, 2019build: Remove needless GCC diagnostic pragmas d35915b6aahebasto force-pushed on Oct 26, 2019hebasto commented at 7:07 PM on October 26, 2019: memberRebased. @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.
DrahtBot removed the label Needs rebase on Oct 26, 2019laanwj renamed this:gui: Remove needless GCC diagnostic pragmas
gui: Remove needless GCC diagnostic pragma
on Nov 4, 2019fanquake closed this on Nov 23, 2019hebasto deleted the branch on Nov 23, 2019DrahtBot locked this on Dec 16, 2021
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
More mirrored repositories can be found on mirror.b10c.me