[gn] enable warnings (#12121)

This commit suppresses the undefined warnings in mbedtls. To detect
such warnings in OpenThread, this commit also enables warnings check
for gn BUILD and fixes issues found.
This commit is contained in:
Yakun Xu
2025-11-09 03:34:48 +08:00
committed by GitHub
parent cfe2999c94
commit a50d1a74dc
7 changed files with 65 additions and 9 deletions
+11
View File
@@ -41,8 +41,18 @@ config("mbedtls_config") {
]
defines = [ "MBEDTLS_CONFIG_FILE=\"${mbedtls_config_file}\"" ]
}
config("warnings_fix_config") {
cflags = [
"-Wno-conversion",
"-Wno-undef",
]
}
group("warnings_fix") {
public_configs = [
":warnings_fix_config",
]
}
@@ -314,6 +324,7 @@ static_library("mbedtls") {
]
public_deps = mbedtls_deps
public_deps += [ ":warnings_fix" ]
public_configs = [ ":mbedtls_config" ]
}