diff --git a/Global.xcconfig b/Global.xcconfig index 6e90342c7..4846c1e6e 100644 --- a/Global.xcconfig +++ b/Global.xcconfig @@ -62,3 +62,55 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(XCODEBUILD_GCC_PREPROCESSOR_DEFINI // Standard ``import`` is used by tons of files and C++ code limits the possibility to use @import so we don't . => Disabled. WARNING_CFLAGS = -Weverything -Wno-objc-missing-property-synthesis -Wno-float-equal -Wno-pedantic -Wno-padded -Wno-sign-conversion -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-auto-import + + +// These are all partially (but not completely?) independent of WARNING_CFLAGS +// and need to be specified explicitly. +GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES +GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES +GCC_WARN_ABOUT_RETURN_TYPE = YES +GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES +GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES +GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES +GCC_WARN_MISSING_PARENTHESES = YES +GCC_WARN_CHECK_SWITCH_STATEMENTS = YES +GCC_WARN_UNUSED_FUNCTION = YES +GCC_WARN_UNUSED_LABEL = YES +GCC_WARN_UNUSED_PARAMETER = YES +GCC_WARN_UNUSED_VARIABLE = YES +GCC_WARN_UNUSED_VALUE = YES +GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE +GCC_WARN_UNKNOWN_PRAGMAS = YES +GCC_WARN_SHADOW = YES +GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES +GCC_WARN_64_TO_32_BIT_CONVERSION = YES +GCC_WARN_ABOUT_MISSING_NEWLINE = YES +GCC_WARN_UNDECLARED_SELECTOR = YES +GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES +CLANG_WARN__EXIT_TIME_DESTRUCTORS = YES +CLANG_WARN_EMPTY_BODY = YES +CLANG_WARN_CONSTANT_CONVERSION = YES +CLANG_WARN_INT_CONVERSION = YES +CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR +CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES +CLANG_WARN_CXX0X_EXTENSIONS = YES +CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES +CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_UNREACHABLE_CODE = YES +CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_ENUM_CONVERSION = YES +CLANG_WARN_BOOL_CONVERSION = YES +CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES + +// Enable extra analyze modes +CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES +CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES +CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES +CLANG_ANALYZER_NONNULL = YES + +// Enable warnings-are-errors for all modes. Don't do this just yet. +// SWIFT_TREAT_WARNINGS_AS_ERRORS = YES +// GCC_TREAT_WARNINGS_AS_ERRORS = YES