From a5725cf4433c6bc8d401983f37f590ecdd3ff872 Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 2 Oct 2020 23:58:23 -0700 Subject: [PATCH 1/4] Use double quote includes with pragma ignore warning --- Sparkle/SPUDownloadData.h | 2 +- Sparkle/SPUDownloader.h | 2 +- Sparkle/SPUDownloaderSession.h | 4 +-- Sparkle/SUAppcast.h | 2 +- Sparkle/SUAppcastItem.h | 2 +- Sparkle/SUCodeSigningVerifier.h | 2 +- Sparkle/SUErrors.h | 2 +- Sparkle/SUFileManager.m | 2 +- Sparkle/SUStandardVersionComparator.h | 4 +-- Sparkle/SUUpdater.h | 6 ++--- Sparkle/SUUpdaterDelegate.h | 2 +- Sparkle/SUVersionDisplayProtocol.h | 2 +- Sparkle/Sparkle.h | 38 ++++++++++++++++----------- 13 files changed, 38 insertions(+), 32 deletions(-) diff --git a/Sparkle/SPUDownloadData.h b/Sparkle/SPUDownloadData.h index a316fc4d..41cd5743 100644 --- a/Sparkle/SPUDownloadData.h +++ b/Sparkle/SPUDownloadData.h @@ -12,7 +12,7 @@ #import #endif -#import +#import "SUExport.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Sparkle/SPUDownloader.h b/Sparkle/SPUDownloader.h index d57f6f6c..5eee9bd5 100644 --- a/Sparkle/SPUDownloader.h +++ b/Sparkle/SPUDownloader.h @@ -11,7 +11,7 @@ #else #import #endif -#import +#import "SPUDownloaderProtocol.h" @protocol SPUDownloaderDelegate; diff --git a/Sparkle/SPUDownloaderSession.h b/Sparkle/SPUDownloaderSession.h index 46c91a51..4bde75aa 100644 --- a/Sparkle/SPUDownloaderSession.h +++ b/Sparkle/SPUDownloaderSession.h @@ -11,8 +11,8 @@ #else #import #endif -#import -#import +#import "SPUDownloader.h" +#import "SPUDownloaderProtocol.h" NS_CLASS_AVAILABLE(NSURLSESSION_AVAILABLE, 7_0) @interface SPUDownloaderSession : SPUDownloader diff --git a/Sparkle/SUAppcast.h b/Sparkle/SUAppcast.h index a77609bd..34276b7d 100644 --- a/Sparkle/SUAppcast.h +++ b/Sparkle/SUAppcast.h @@ -14,7 +14,7 @@ #else #import #endif -#import +#import "SUExport.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Sparkle/SUAppcastItem.h b/Sparkle/SUAppcastItem.h index 9396f6fd..1d8b1d01 100644 --- a/Sparkle/SUAppcastItem.h +++ b/Sparkle/SUAppcastItem.h @@ -14,7 +14,7 @@ #else #import #endif -#import +#import "SUExport.h" @class SUSignatures; SU_EXPORT @interface SUAppcastItem : NSObject diff --git a/Sparkle/SUCodeSigningVerifier.h b/Sparkle/SUCodeSigningVerifier.h index 959aaa80..3756a378 100644 --- a/Sparkle/SUCodeSigningVerifier.h +++ b/Sparkle/SUCodeSigningVerifier.h @@ -14,7 +14,7 @@ #else #import #endif -#import +#import "SUExport.h" SU_EXPORT @interface SUCodeSigningVerifier : NSObject + (BOOL)codeSignatureAtBundleURL:(NSURL *)oldBundlePath matchesSignatureAtBundleURL:(NSURL *)newBundlePath error:(NSError **)error; diff --git a/Sparkle/SUErrors.h b/Sparkle/SUErrors.h index 3d93f678..4b160c4f 100644 --- a/Sparkle/SUErrors.h +++ b/Sparkle/SUErrors.h @@ -14,7 +14,7 @@ #else #import #endif -#import +#import "SUExport.h" /** * Error domain used by Sparkle diff --git a/Sparkle/SUFileManager.m b/Sparkle/SUFileManager.m index d09104ee..8ede3a8d 100644 --- a/Sparkle/SUFileManager.m +++ b/Sparkle/SUFileManager.m @@ -10,7 +10,7 @@ #import "SUOperatingSystem.h" #import "SUFileOperationConstants.h" -#import +#import "SUErrors.h" #include #include diff --git a/Sparkle/SUStandardVersionComparator.h b/Sparkle/SUStandardVersionComparator.h index 44566b1d..ed11921a 100644 --- a/Sparkle/SUStandardVersionComparator.h +++ b/Sparkle/SUStandardVersionComparator.h @@ -14,8 +14,8 @@ #else #import #endif -#import -#import +#import "SUExport.h" +#import "SUVersionComparisonProtocol.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index dbd9dfdf..d05270f2 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -14,9 +14,9 @@ #else #import #endif -#import -#import -#import +#import "SUExport.h" +#import "SUVersionComparisonProtocol.h" +#import "SUVersionDisplayProtocol.h" @class SUAppcastItem, SUAppcast; diff --git a/Sparkle/SUUpdaterDelegate.h b/Sparkle/SUUpdaterDelegate.h index f2cd606e..ec844d04 100644 --- a/Sparkle/SUUpdaterDelegate.h +++ b/Sparkle/SUUpdaterDelegate.h @@ -12,7 +12,7 @@ #import #endif -#import +#import "SUExport.h" @protocol SUVersionComparison, SUVersionDisplay; @class SUUpdater, SUAppcast, SUAppcastItem; diff --git a/Sparkle/SUVersionDisplayProtocol.h b/Sparkle/SUVersionDisplayProtocol.h index c8be57fb..980efb3f 100644 --- a/Sparkle/SUVersionDisplayProtocol.h +++ b/Sparkle/SUVersionDisplayProtocol.h @@ -11,7 +11,7 @@ #else #import #endif -#import +#import "SUExport.h" /*! Applies special display formatting to version numbers. diff --git a/Sparkle/Sparkle.h b/Sparkle/Sparkle.h index d9a15ebd..1085d419 100644 --- a/Sparkle/Sparkle.h +++ b/Sparkle/Sparkle.h @@ -12,22 +12,28 @@ // This list should include the shared headers. It doesn't matter if some of them aren't shared (unless // there are name-space collisions) so we can list all of them to start with: -#import -#import -#import -#import -#import -#import -#import -#import +#pragma clang diagnostic push +// Do not use <> style includes since 2.x has two frameworks that need to work: Sparkle and SparkleCore +#pragma clang diagnostic ignored "-Wquoted-include-in-framework-header" -#import -#import -#import -#import -#import -#import -#import -#import +#import "SUAppcast.h" +#import "SUAppcastItem.h" +#import "SUStandardVersionComparator.h" +#import "SUUpdater.h" +#import "SUUpdaterDelegate.h" +#import "SUVersionComparisonProtocol.h" +#import "SUVersionDisplayProtocol.h" +#import "SUErrors.h" + +#import "SPUDownloader.h" +#import "SPUDownloaderDelegate.h" +#import "SPUDownloaderDeprecated.h" +#import "SPUDownloadData.h" +#import "SPUDownloaderProtocol.h" +#import "SPUDownloaderSession.h" +#import "SPUURLRequest.h" +#import "SUCodeSigningVerifier.h" + +#pragma clang diagnostic pop #endif From 80264da3687d9ab825ef18d066f67eab65072f23 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 3 Oct 2020 00:10:53 -0700 Subject: [PATCH 2/4] Add -Wno-quoted-include-in-framework-header to ConfigCommon --- Configurations/ConfigCommon.xcconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index a91b1521..2f8b6370 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -89,4 +89,4 @@ CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties // Turn on all warnings, then disable a few which are almost impossible to avoid -WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments $(WARNING_CFLAGS_EXTRA) +WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments -Wno-quoted-include-in-framework-header $(WARNING_CFLAGS_EXTRA) From c15b9da2a75dc5f3d295d07b682a3e19b58f151d Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 3 Oct 2020 00:38:15 -0700 Subject: [PATCH 3/4] Set CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER instead --- Configurations/ConfigCommon.xcconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 2f8b6370..7254323f 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -55,6 +55,7 @@ CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES CLANG_WARN_UNREACHABLE_CODE = YES GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES From c1e7c09886a44b596dfa29b9c440217e40ea81b8 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 3 Oct 2020 01:01:02 -0700 Subject: [PATCH 4/4] Remove -Wno-quoted-include-in-framework-header from WARNING_CFLAGS It is already specified above as CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER. --- Configurations/ConfigCommon.xcconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 7254323f..959b212b 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -90,4 +90,4 @@ CLANG_ENABLE_MODULES[sdk=macosx10.8] = NO WARNING_CFLAGS_EXTRA = -Wno-custom-atomic-properties -Wno-implicit-atomic-properties // Turn on all warnings, then disable a few which are almost impossible to avoid -WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments -Wno-quoted-include-in-framework-header $(WARNING_CFLAGS_EXTRA) +WARNING_CFLAGS = -Wall -Weverything -Wno-unused-macros -Wno-gnu-statement-expression -Wno-arc-repeated-use-of-weak -Wno-auto-import -Wno-gnu-zero-variadic-macro-arguments $(WARNING_CFLAGS_EXTRA)