The iOS Xcode template turns five warning classes off at project level:
CLANG_WARN_EMPTY_BODY CLANG_WARN_ENUM_CONVERSION
CLANG_WARN_INT_CONVERSION CLANG_WARN__DUPLICATE_METHOD_MATCH
GCC_WARN_UNUSED_VARIABLE
Being project level, the hand-written Ports/iOSPort/nativeSources lose them
too, not just the translated output they were presumably turned off for.
CLANG_WARN_EMPTY_BODY and CLANG_WARN__DUPLICATE_METHOD_MATCH are already
flipped to YES and cost nothing. The remaining three are each gated on their
category reaching zero, and should ship one setting per PR:
| setting |
blocked by |
census count |
CLANG_WARN_ENUM_CONVERSION |
-Wenum-conversion |
10 instances / 6 shapes (port) |
GCC_WARN_UNUSED_VARIABLE |
-Wunused-variable |
98 generated + 71 port + 10 runtime |
CLANG_WARN_INT_CONVERSION |
-Wint-conversion |
14 instances / 7 shapes (port) |
CLANG_WARN_INT_CONVERSION deserves the hardest look. In current clang
-Wint-conversion defaults to an error, so = NO is actively suppressing a
pointer/integer confusion class. Treat its remaining 14 as a bug list, not a
burn-down list. (The 13 instances that were there when this started are already
fixed and their baseline rows deleted.)
Three constraints on editing the template pbxproj, all verified the hard
way:
- Do not move or reformat the literal-matched anchor lines (
SDKROOT,
CLANG_ENABLE_MODULES, IPHONEOS_DEPLOYMENT_TARGET, PRODUCT_NAME,
TARGETED_DEVICE_FAMILY) -- IPhoneBuilder matches them as exact literals.
Adding lines around them is safe; editing them is not.
- Never introduce a
}; inside a buildSettings = { ... } block.
injectDevelopmentTeam matches buildSettings = \{.*?\}; non-greedy with
DOTALL and the first nested }; truncates it. A parenthesised list is safe;
a nested dictionary is not.
- Comments must not contain the substring
template -- replaceInFile is
a plain global replace that rewrites it to the application name.
Do not extend the app-extension CLANG_WARN_* block wholesale: it is written
for ARC-enabled code and the main target is CLANG_ENABLE_OBJC_ARC = NO, so
several members are meaningless there. Take
CLANG_WARN_UNGUARDED_AVAILABILITY and
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS individually.
Found by the native warning census (scripts/check-native-warnings.py).
The iOS Xcode template turns five warning classes off at project level:
Being project level, the hand-written
Ports/iOSPort/nativeSourceslose themtoo, not just the translated output they were presumably turned off for.
CLANG_WARN_EMPTY_BODYandCLANG_WARN__DUPLICATE_METHOD_MATCHare alreadyflipped to
YESand cost nothing. The remaining three are each gated on theircategory reaching zero, and should ship one setting per PR:
CLANG_WARN_ENUM_CONVERSION-Wenum-conversionGCC_WARN_UNUSED_VARIABLE-Wunused-variableCLANG_WARN_INT_CONVERSION-Wint-conversionCLANG_WARN_INT_CONVERSIONdeserves the hardest look. In current clang-Wint-conversiondefaults to an error, so= NOis actively suppressing apointer/integer confusion class. Treat its remaining 14 as a bug list, not a
burn-down list. (The 13 instances that were there when this started are already
fixed and their baseline rows deleted.)
Three constraints on editing the template pbxproj, all verified the hard
way:
SDKROOT,CLANG_ENABLE_MODULES,IPHONEOS_DEPLOYMENT_TARGET,PRODUCT_NAME,TARGETED_DEVICE_FAMILY) --IPhoneBuildermatches them as exact literals.Adding lines around them is safe; editing them is not.
};inside abuildSettings = { ... }block.injectDevelopmentTeammatchesbuildSettings = \{.*?\};non-greedy withDOTALL and the first nested
};truncates it. A parenthesised list is safe;a nested dictionary is not.
template--replaceInFileisa plain global replace that rewrites it to the application name.
Do not extend the app-extension
CLANG_WARN_*block wholesale: it is writtenfor ARC-enabled code and the main target is
CLANG_ENABLE_OBJC_ARC = NO, soseveral members are meaningless there. Take
CLANG_WARN_UNGUARDED_AVAILABILITYandCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONSindividually.Found by the native warning census (
scripts/check-native-warnings.py).