build: fix build warning of c-ares under GN build

PR-URL: https://github.com/nodejs/node/pull/53750
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
Cheng authored and Antoine du Hamel committed 2024-07-16 12:01:15 +02:00
1 parent 22ca334090
commit 3d60b38afa
1 file changed
+11 -5
+11 -5
View File
@@ -65,11 +65,17 @@ template("cares_gn_build") {
sources += gypi_values.cares_sources_mac
}
if (is_clang || !is_win) {
cflags_c = [
"-Wno-implicit-fallthrough",
"-Wno-unreachable-code",
]
if (is_clang) {
if (is_win) {
cflags_c = [
"-Wno-macro-redefined",
]
} else {
cflags_c = [
"-Wno-implicit-fallthrough",
"-Wno-unreachable-code",
]
}
}
}
}