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 GitHub committed 2024-07-09 08:42:40 +00:00
1 parent 66a635cece
commit 2b068ffc4a
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",
]
}
}
}
}