Bug 1072071 - disable warning C4267 on windows; r=mshal
--- a/configure.in
+++ b/configure.in
@@ -2136,29 +2136,32 @@ ia64*-hpux*)
CFLAGS="$CFLAGS -FS"
CXXFLAGS="$CXXFLAGS -FS"
fi
# khuey says we can safely ignore MSVC warning C4251
# MSVC warning C4244 (implicit type conversion may lose data) warns
# and requires workarounds for perfectly valid code. Also, GCC/clang
# don't warn about it by default. So for consistency/sanity, we turn
# it off on MSVC, too.
+ # MSVC warning C4267 warns for narrowing type conversions from size_t
+ # to 32-bit integer types on 64-bit platforms. Since this is virtually
+ # the same thing as C4244, we disable C4267, too.
# MSVC warning C4345 warns of newly conformant behavior as of VS2003.
# MSVC warning C4351 warns of newly conformant behavior as of VS2005.
# MSVC warning C4482 warns when an enum value is refered specifing the
# name of the enum itself. This behavior is allowed in C++11, and the
# warning has been removed in VS2012.
# MSVC warning C4800 warns when a value is implicitly cast to bool,
# because this also forces narrowing to a single byte, which can be a
# perf hit. But this matters so little in practice (and often we want
# that behavior) that it's better to turn it off.
# MSVC warning C4819 warns some UTF-8 characters (e.g. copyright sign)
# on non-Western system locales even if it is in a comment.
- CFLAGS="$CFLAGS -wd4244 -wd4819"
- CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4345 -wd4351 -wd4482 -wd4800 -wd4819"
+ CFLAGS="$CFLAGS -wd4244 -wd4267 -wd4819"
+ CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4345 -wd4351 -wd4482 -wd4800 -wd4819"
# make 'foo == bar;' error out
CFLAGS="$CFLAGS -we4553"
CXXFLAGS="$CXXFLAGS -we4553"
LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib netapi32.lib"
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
WARNINGS_AS_ERRORS='-WX'
MOZ_OPTIMIZE_FLAGS='-O1 -Oi'
MOZ_FIX_LINK_PATHS=
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1696,18 +1696,21 @@ ia64*-hpux*)
CFLAGS="$CFLAGS -FS"
CXXFLAGS="$CXXFLAGS -FS"
fi
# khuey says we can safely ignore MSVC warning C4251
# MSVC warning C4244 (implicit type conversion may lose data) warns
# and requires workarounds for perfectly valid code. Also, GCC/clang
# don't warn about it by default. So for consistency/sanity, we turn
# it off on MSVC, too.
- CFLAGS="$CFLAGS -wd4244"
- CXXFLAGS="$CXXFLAGS -wd4244 -wd4251"
+ # MSVC warning C4267 warns for narrowing type conversions from size_t
+ # to 32-bit integer types on 64-bit platforms. Since this is virtually
+ # the same thing as C4244, we disable C4267, too.
+ CFLAGS="$CFLAGS -wd4244 -wd4267"
+ CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251"
# make 'foo == bar;' error out
CFLAGS="$CFLAGS -we4553"
CXXFLAGS="$CXXFLAGS -we4553"
LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib psapi.lib"
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
WARNINGS_AS_ERRORS='-WX'
MOZ_OPTIMIZE_FLAGS="-O2"
MOZ_FIX_LINK_PATHS=