diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index dedb1ae26ad0dd..5c2accfcdc078e 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -249,6 +249,10 @@ config("strict_warnings") { ] } + if (current_os == "mac" || current_os == "ios") { + cflags += [ "-Wconversion" ] + } + if (build_java_matter_controller) { cflags -= [ "-Wshadow" ] } diff --git a/third_party/boringssl/repo/BUILD.gn b/third_party/boringssl/repo/BUILD.gn index cb613d28454edd..634be1687232a8 100644 --- a/third_party/boringssl/repo/BUILD.gn +++ b/third_party/boringssl/repo/BUILD.gn @@ -20,7 +20,10 @@ import("BUILD.generated.gni") config("boringssl_config") { include_dirs = [ "src/include" ] - cflags = [ "-Wno-unused-variable" ] + cflags = [ + "-Wno-unused-variable", + "-Wno-conversion", + ] if (is_clang) { cflags += [ "-Wno-shorten-64-to-32" ] diff --git a/third_party/editline/BUILD.gn b/third_party/editline/BUILD.gn index 900333b14d510e..ec2cdd4a2e3bb2 100644 --- a/third_party/editline/BUILD.gn +++ b/third_party/editline/BUILD.gn @@ -18,8 +18,10 @@ import("${build_root}/config/compiler/compiler.gni") config("editline_config") { include_dirs = [ "repo/include" ] + cflags = [ "-Wno-conversion" ] + if (is_clang) { - cflags = [ "-Wno-shorten-64-to-32" ] + cflags += [ "-Wno-shorten-64-to-32" ] } } diff --git a/third_party/nlunit-test/BUILD.gn b/third_party/nlunit-test/BUILD.gn index 48f81f0a395301..d6907714acd446 100644 --- a/third_party/nlunit-test/BUILD.gn +++ b/third_party/nlunit-test/BUILD.gn @@ -18,8 +18,10 @@ import("${build_root}/config/compiler/compiler.gni") config("nlunit-test_config") { include_dirs = [ "repo/src" ] + cflags = [ "-Wno-conversion" ] + if (is_clang) { - cflags = [ "-Wno-shorten-64-to-32" ] + cflags += [ "-Wno-shorten-64-to-32" ] } }