From 06abc1ecd93ebdd0d6c0e900574f2e34ed4d135d Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 7 Apr 2016 00:07:45 -0700 Subject: [PATCH] configure: test for -Wshorten-64-to-32 in non hbd builds provides msvc-like warnings for implicit conversions from 64-bit to 32-bit types --enable-vp9-highbitdepth still requires some work this also skips CXXFLAGS for now as some work would be needed to cleanup third_party/*.cc or split it from test/*.cc where it comes to flags. Change-Id: Ic9a095b73286eba5ed39bfc27ff69593748cbbf4 --- configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 27ec8d9..7065dfe 100755 --- a/configure +++ b/configure @@ -586,6 +586,11 @@ process_toolchain() { if enabled mips || [ -z "${INLINE}" ]; then enabled extra_warnings || check_add_cflags -Wno-unused-function fi + if ! enabled vp9_highbitdepth; then + # Avoid this warning for third_party C++ sources. Some reorganization + # would be needed to apply this only to test/*.cc. + check_cflags -Wshorten-64-to-32 && add_cflags_only -Wshorten-64-to-32 + fi fi if enabled icc; then -- 2.7.4