From cee54179a323c6b3e4aea69a3cfac30f8006aeba Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Thu, 5 Dec 2019 15:30:14 +0100 Subject: [PATCH] Stop setting -Wextra (the toolchain already does that). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment was stale and setting -Wextra actually turns on diagnostics that are turned off by Chromium. For example: "-Wextra -Wno-deprecated-copy -Wextra" will turn on -Wdeprecated-copy because starting from https://reviews.llvm.org/D70342 -Wdeprecated-copy is part of -Wextra. Bug: webrtc:11180 Change-Id: Ia5d1e22bfe42d67cd892ae07620e7fd2daf9a7a4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161332 Commit-Queue: Mirko Bonadei Reviewed-by: Patrik Höglund Cr-Commit-Position: refs/heads/master@{#30019} --- BUILD.gn | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 337be46c4c..f4988035b9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -271,6 +271,8 @@ config("common_config") { defines += [ "RTC_DISABLE_TRACE_EVENTS" ] } + cflags = [] + if (build_with_chromium) { defines += [ # NOTICE: Since common_inherited_config is used in public_configs for our @@ -282,14 +284,6 @@ config("common_config") { ] } else { if (is_posix || is_fuchsia) { - # Enable more warnings: -Wextra is currently disabled in Chromium. - cflags = [ - "-Wextra", - - # Repeat some flags that get overridden by -Wextra. - "-Wno-unused-parameter", - "-Wno-missing-field-initializers", - ] cflags_c += [ # TODO(bugs.webrtc.org/9029): enable commented compiler flags. # Some of these flags should also be added to cflags_objc.