From 04798fb104a5362c22acc45d0efe0ca704035fc1 Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 9 Jul 2024 17:42:40 +0900 Subject: [PATCH] build: fix build warning of c-ares under GN build PR-URL: https://github.com/nodejs/node/pull/53750 Reviewed-By: James M Snell Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Marco Ippolito --- deps/cares/unofficial.gni | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/deps/cares/unofficial.gni b/deps/cares/unofficial.gni index 717f9dba8f4446..9296548239fcde 100644 --- a/deps/cares/unofficial.gni +++ b/deps/cares/unofficial.gni @@ -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", + ] + } } } }