Commit 46207ecb authored by Mirko Bonadei's avatar Mirko Bonadei Committed by Commit Bot

Fix no_shorten_64_warnings for GCC builds.

WebRTC still supports GCC, this CL makes sure /wd4267 is only applied
to MSVC. Since there is no -Wshorten-64-to-32 in GCC, nothing gets
suppressed in that case.

Bug: 588506
Change-Id: I0b7477ec26123437f4e2274e0cc9d92738b0b066
Reviewed-on: https://chromium-review.googlesource.com/1205394Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588963}
parent 2d0ccc6b
......@@ -1787,10 +1787,12 @@ config("no_shorten_64_warnings") {
if (is_clang) {
cflags = [ "-Wno-shorten-64-to-32" ]
} else {
# MSVC does not have an explicit warning equivalent to
# -Wshorten-64-to-32 but 4267 warns for size_t -> int
# on 64-bit builds, so is the closest.
cflags = [ "/wd4267" ]
if (is_win) {
# MSVC does not have an explicit warning equivalent to
# -Wshorten-64-to-32 but 4267 warns for size_t -> int
# on 64-bit builds, so is the closest.
cflags = [ "/wd4267" ]
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment