GN: Replace Windows suppressions of warning 4267 with config.

This makes the GN configurations easier to read.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2020343003
Cr-Commit-Position: refs/heads/master@{#13006}
This commit is contained in:
kjellander 2016-06-02 02:09:52 -07:00 committed by Commit bot
parent cb7b44975f
commit 8f4419b074
8 changed files with 28 additions and 53 deletions

View File

@ -207,12 +207,8 @@ source_set("audio_processing") {
sources += [ "aecm/aecm_core_c.cc" ]
}
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncations
]
}
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.

View File

@ -18,16 +18,12 @@ source_set("bitrate_controller") {
"send_side_bandwidth_estimation.h",
]
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncations
]
}
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.

View File

@ -14,16 +14,12 @@ source_set("congestion_controller") {
"include/congestion_controller.h",
]
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncations
]
}
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.

View File

@ -22,19 +22,15 @@ source_set("media_file") {
"media_file_utility.h",
]
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncations
]
}
configs += [ "../..:common_config" ]
public_configs = [
"../..:common_inherited_config",
":media_file_config",
]
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
@ -43,7 +39,7 @@ source_set("media_file") {
deps = [
"../..:webrtc_common",
"../../system_wrappers",
"../../common_audio",
"../../system_wrappers",
]
}

View File

@ -171,11 +171,11 @@ source_set("rtp_rtcp") {
"../remote_bitrate_estimator",
]
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncations
# TODO(kjellander): Bug 261: fix this warning.
"/wd4373", # virtual function override.
]

View File

@ -75,12 +75,8 @@ source_set("video_coding") {
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncation.
]
}
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
@ -263,19 +259,15 @@ source_set("webrtc_vp8") {
configs += [ "../..:common_config" ]
public_configs = [ "../..:common_inherited_config" ]
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
configs -= [ "//build/config/clang:find_bad_constructs" ]
}
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncation.
]
}
deps = [
":video_coding_utility",
"../..:webrtc_common",

View File

@ -121,13 +121,13 @@ static_library("system_wrappers") {
sources += [ "source/atomic32_darwin.cc" ]
}
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_win) {
libs += [ "winmm.lib" ]
cflags = [
"/wd4267", # size_t to int truncation.
"/wd4334", # Ignore warning on shift operator promotion.
]
cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion.
}
deps += [ "../base:rtc_base_approved" ]

View File

@ -288,12 +288,11 @@ test("test_support_unittests") {
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config" ]
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_win) {
cflags = [
# TODO(jschuh): Bug 1348: fix this warning.
"/wd4267", # size_t to int truncations
"/wd4373", # virtual override w/different const/volatile signature.
]
cflags = [ "/wd4373" ] # virtual override w/different const/volatile signature.
}
if (is_clang) {