From 2737ac00c38513d976fda08104a5014221b0c99c Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 21 May 2013 22:53:10 +0000 Subject: - Fix all the Xcode 4.6.2 build warnings, and tweak warning settings to enable some more --- .../SPMySQLFramework.xcodeproj/project.pbxproj | 17 ++++++++++++++++- .../SPMySQLFramework/Source/SPMySQL Private APIs.h | 2 +- .../Source/SPMySQLConnection Categories/Conversion.m | 2 +- .../SPMySQLConnection Categories/Databases & Tables.m | 2 +- .../Source/SPMySQLConnection Categories/Encoding.m | 2 +- .../Querying & Preparation.m | 2 +- .../Source/SPMySQLConnection Categories/Server Info.m | 2 +- .../SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch | 2 +- .../Source/SPMySQLResult Categories/Field Definitions.m | 2 +- Frameworks/SPMySQLFramework/Source/SPMySQLUtilities.h | 2 +- 10 files changed, 25 insertions(+), 10 deletions(-) (limited to 'Frameworks/SPMySQLFramework') diff --git a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj index 1644f7d5..ad34eef8 100644 --- a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj +++ b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj @@ -435,7 +435,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0450; + LastUpgradeCheck = 0460; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "SPMySQLFramework" */; compatibilityVersion = "Xcode 3.2"; @@ -565,11 +565,16 @@ buildSettings = { ARCHS = "$(NATIVE_ARCH_ACTUAL)"; CLANG_LINK_OBJC_RUNTIME = NO; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -593,10 +598,15 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; @@ -619,10 +629,15 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; CLANG_LINK_OBJC_RUNTIME = NO; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h b/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h index c3c57e3f..50d40eac 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQL Private APIs.h @@ -112,4 +112,4 @@ static inline id SPMySQLResultGetObject(SPMySQLResult* self, char* bytes, NSUInt if (!cachedMethodPointer) cachedMethodPointer = (SPMySQLResultGetObjectMethodPtr)[self methodForSelector:cachedSelector]; return cachedMethodPointer(self, cachedSelector, bytes, length, fieldType, fieldIndex); -} \ No newline at end of file +} diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m index 0a3cf99b..aa9a228b 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Conversion.m @@ -94,4 +94,4 @@ return [NSString stringWithCString:cString encoding:stringEncoding]; } -@end \ No newline at end of file +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m index 2065c998..2d19b872 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m @@ -256,4 +256,4 @@ return YES; } -@end \ No newline at end of file +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m index f2b5fc48..38eb104f 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m @@ -412,4 +412,4 @@ NSLog(@"SPMySQL Framework was asked for the MySQL charset for the string encoding '%llu', which is currently unhandled.", (unsigned long long)aStringEncoding); return nil; } -@end \ No newline at end of file +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m index c007a07e..f437ca87 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m @@ -673,4 +673,4 @@ } } -@end \ No newline at end of file +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m index 59a384a9..2df42677 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Server Info.m @@ -176,4 +176,4 @@ return ![self queryErrored]; } -@end \ No newline at end of file +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch b/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch index 8528c29c..470098b8 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLFramework_Prefix.pch @@ -8,4 +8,4 @@ #import "mysql.h" #import "SPMySQL.h" -#import "SPMySQLUtilities.h" \ No newline at end of file +#import "SPMySQLUtilities.h" diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m index 2db121bd..8617cdc3 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Field Definitions.m @@ -554,4 +554,4 @@ const SPMySQLResultCharset SPMySQLCharsetMap[] = } } -@end \ No newline at end of file +@end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLUtilities.h b/Frameworks/SPMySQLFramework/Source/SPMySQLUtilities.h index 0a8c19b0..6d2a28b9 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLUtilities.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLUtilities.h @@ -42,4 +42,4 @@ static double _elapsedSecondsSinceAbsoluteTime(uint64_t comparisonTime) Nanoseconds elapsedTime = AbsoluteToNanoseconds(*(AbsoluteTime *)&(elapsedTime_t)); return (((double)UnsignedWideToUInt64(elapsedTime)) * 1e-9); -} \ No newline at end of file +} -- cgit v1.2.3