From 496c64c0fa312454dca162bdff2e90e9618447da Mon Sep 17 00:00:00 2001 From: kjellander Date: Thu, 3 Nov 2016 07:57:35 -0700 Subject: [PATCH] Cleanup warnings configs and enable more for Android ARM64 This will enable more warnings for Android ARM64 build. The main purpose is to clean up clutter in the warnings config. BUG=webrtc:6653 NOTRY=True Review-Url: https://codereview.webrtc.org/2479533002 Cr-Commit-Position: refs/heads/master@{#14917} --- webrtc/BUILD.gn | 34 +++++++++++++--------------------- webrtc/build/common.gypi | 24 +++++++----------------- 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 0dd61bbb86..d1f52b32fe 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -152,29 +152,21 @@ config("common_config") { ] } else { if (is_posix) { - # -Wextra is currently disabled in Chromium"s common.gypi. Enable - # for targets that can handle it. For Android/arm64 right now - # there will be an "enumeral and non-enumeral type in conditional - # expression" warning in android_tools/ndk_experimental"s version - # of stlport. - # See: https://code.google.com/p/chromium/issues/detail?id=379699 - if (current_cpu != "arm64" || !is_android) { - cflags = [ - "-Wextra", + # Enable more warnings: -Wextra is currently disabled in Chromium. + cflags = [ + "-Wextra", - # We need to repeat some flags from Chromium"s common.gypi - # here that get overridden by -Wextra. - "-Wno-unused-parameter", - "-Wno-missing-field-initializers", - "-Wno-strict-overflow", - ] - cflags_cc = [ - "-Wnon-virtual-dtor", + # Repeat some flags that get overridden by -Wextra. + "-Wno-unused-parameter", + "-Wno-missing-field-initializers", + "-Wno-strict-overflow", + ] + cflags_cc = [ + "-Wnon-virtual-dtor", - # This is enabled for clang; enable for gcc as well. - "-Woverloaded-virtual", - ] - } + # This is enabled for clang; enable for gcc as well. + "-Woverloaded-virtual", + ] } if (is_clang) { diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 304c933c38..9a79de9eb0 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -320,23 +320,13 @@ ], 'conditions': [ ['os_posix==1', { - 'conditions': [ - # -Wextra is currently disabled in Chromium's common.gypi. Enable - # for targets that can handle it. For Android/arm64 right now - # there will be an 'enumeral and non-enumeral type in conditional - # expression' warning in android_tools/ndk_experimental's version - # of stlport. - # See: https://code.google.com/p/chromium/issues/detail?id=379699 - ['target_arch!="arm64" or OS!="android"', { - 'cflags': [ - '-Wextra', - # We need to repeat some flags from Chromium's common.gypi - # here that get overridden by -Wextra. - '-Wno-unused-parameter', - '-Wno-missing-field-initializers', - '-Wno-strict-overflow', - ], - }], + # 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', + '-Wno-strict-overflow', ], 'cflags_cc': [ '-Wnon-virtual-dtor',