chore: enable clang suspicious implicit conversion warning and fix related type narrowing issues
Add CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES to both Debug and Release Xcode build configurations. Fix the resulting warnings by adding explicit casts in wren_compiler.c (readUnicodeEscape, emit, emitShort, emitByteArg) and wren_vm.c (READ_SHORT macro, makeCallStub bytecode assignment) to prevent unintended truncation or sign extension during implicit integer conversions.
This commit is contained in:
@@ -269,6 +269,7 @@
|
||||
29AB1F101816E3AD004B501E /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_PEDANTIC = NO;
|
||||
@@ -279,6 +280,7 @@
|
||||
29AB1F111816E3AD004B501E /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_PEDANTIC = NO;
|
||||
|
||||
Reference in New Issue
Block a user