From 4b507e48da30711e25d1bcdd19580f25887a2267 Mon Sep 17 00:00:00 2001 From: Hao Song Date: Wed, 27 Feb 2019 12:15:03 -0800 Subject: [PATCH 1/2] Fix warnings of `GCC_WARN_ABOUT_MISSING_NEWLINE` for 2.x branch (#607) * Fix warnings of `GCC_WARN_ABOUT_MISSING_NEWLINE` * Turn on `GCC_WARN_ABOUT_MISSING_NEWLINE` in Xcode project --- SVGKit-iOS.xcodeproj/project.pbxproj | 2 ++ Source/DOM classes/Core DOM/DOMGlobalSettings.h | 2 +- Source/DOM classes/SVG-DOM/SVGNumber.h | 2 +- Source/DOM classes/Unported or Partial DOM/SVGElement.h | 2 +- Source/Foundation additions/NSData+NSInputStream.h | 2 +- Source/Foundation additions/NSData+NSInputStream.m | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 0d680dbda..314a444cb 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -3563,6 +3563,7 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; @@ -3594,6 +3595,7 @@ GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; diff --git a/Source/DOM classes/Core DOM/DOMGlobalSettings.h b/Source/DOM classes/Core DOM/DOMGlobalSettings.h index 1ddcd2954..661b12837 100644 --- a/Source/DOM classes/Core DOM/DOMGlobalSettings.h +++ b/Source/DOM classes/Core DOM/DOMGlobalSettings.h @@ -1 +1 @@ -#define DEBUG_DOM_PARSING 0 \ No newline at end of file +#define DEBUG_DOM_PARSING 0 diff --git a/Source/DOM classes/SVG-DOM/SVGNumber.h b/Source/DOM classes/SVG-DOM/SVGNumber.h index dde75b96a..6993a08a0 100644 --- a/Source/DOM classes/SVG-DOM/SVGNumber.h +++ b/Source/DOM classes/SVG-DOM/SVGNumber.h @@ -9,4 +9,4 @@ typedef struct { float value; -} SVGNumber; \ No newline at end of file +} SVGNumber; diff --git a/Source/DOM classes/Unported or Partial DOM/SVGElement.h b/Source/DOM classes/Unported or Partial DOM/SVGElement.h index 2fc16e10b..be92fe776 100644 --- a/Source/DOM classes/Unported or Partial DOM/SVGElement.h +++ b/Source/DOM classes/Unported or Partial DOM/SVGElement.h @@ -61,4 +61,4 @@ -(NSString*) cascadedValueForStylableProperty:(NSString*) stylableProperty; -(NSString*) cascadedValueForStylableProperty:(NSString*) stylableProperty inherit:(BOOL)inherit; -@end \ No newline at end of file +@end diff --git a/Source/Foundation additions/NSData+NSInputStream.h b/Source/Foundation additions/NSData+NSInputStream.h index 8f9e091ca..0adffb770 100644 --- a/Source/Foundation additions/NSData+NSInputStream.h +++ b/Source/Foundation additions/NSData+NSInputStream.h @@ -17,4 +17,4 @@ */ +(NSData*)dataWithContentsOfStream:(NSInputStream*)input initialCapacity:(NSUInteger)capacity error:(NSError **)error; -@end \ No newline at end of file +@end diff --git a/Source/Foundation additions/NSData+NSInputStream.m b/Source/Foundation additions/NSData+NSInputStream.m index ed28011a8..23b05f55a 100644 --- a/Source/Foundation additions/NSData+NSInputStream.m +++ b/Source/Foundation additions/NSData+NSInputStream.m @@ -57,4 +57,4 @@ +(NSData *)dataWithContentsOfStream:(NSInputStream *)input initialCapacity:(NSUI } -@end \ No newline at end of file +@end From c40671b9a264f8f71831c4e0452736debfae2164 Mon Sep 17 00:00:00 2001 From: luisafcastano <55200689+luisafcastano@users.noreply.github.com> Date: Tue, 12 Nov 2019 14:24:18 +0100 Subject: [PATCH 2/2] Make safe for extensions (#655) Setting the flag APPLICATION_EXTENSION_API_ONLY makes the warning 'Linking against a dylib which is not safe for use in application extensions' disappear. --- SVGKit-iOS.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SVGKit-iOS.xcodeproj/project.pbxproj b/SVGKit-iOS.xcodeproj/project.pbxproj index 314a444cb..494cdf925 100644 --- a/SVGKit-iOS.xcodeproj/project.pbxproj +++ b/SVGKit-iOS.xcodeproj/project.pbxproj @@ -3658,6 +3658,7 @@ 825CDAC01BDA4BC0003C1C12 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; @@ -3701,6 +3702,7 @@ 825CDAC11BDA4BC0003C1C12 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;