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}
This commit is contained in:
kjellander
2016-11-03 07:57:35 -07:00
committed by Commit bot
parent 43a9dc0f93
commit 496c64c0fa
2 changed files with 20 additions and 38 deletions

View File

@ -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) {

View File

@ -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',