From 87fffb9ef9819249bb8eebe4d453bf8e9defc828 Mon Sep 17 00:00:00 2001 From: Cheng Date: Sun, 7 Jul 2024 14:58:09 +0900 Subject: [PATCH] build: fix build warning of c-ares under GN build --- 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", + ] + } } } }