Skip to content

Commit

Permalink
SERVER-17414 Disable warnings in third-party
Browse files Browse the repository at this point in the history
  • Loading branch information
markbenvenuto committed Oct 20, 2017
1 parent 0bd0f20 commit f13e5ad
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/third_party/IntelRDFPMathLib20U1/SConscript
Expand Up @@ -332,8 +332,13 @@ env.Append(CPPDEFINES=cpp_defines)
if env.TargetOSIs('windows'):
extra_defines = ['WINDOWS', 'WNT', 'winnt']
env.Append(CPPDEFINES=extra_defines)
# C4273: '...': inconsistent dll linkage
env.Append(CCFLAGS=['/wd4273'])
# C4477: incorrect scanf format string
env.Append(CCFLAGS=['/wd4477'])

for to_remove in ['-Werror', '-Wall', '-W']:

for to_remove in ['-Werror', '-Wall', '-W', '/W3']:
removeIfPresent(env['CCFLAGS'], to_remove)

env.Library(
Expand Down
4 changes: 4 additions & 0 deletions src/third_party/icu4c-57.1/source/SConscript
Expand Up @@ -44,6 +44,10 @@ for to_remove in ['-Werror', '-Wall', '-W']:
if env.ToolchainIs('clang', 'GCC'):
env.Append(CCFLAGS=['-Wno-sign-compare'])

if env.TargetOSIs('windows'):
# C4996: '...': was declared deprecated
env.Append(CCFLAGS=['/wd4996'])

i18nEnv = env.Clone()
i18nEnv.Append(
CPPDEFINES=[
Expand Down
10 changes: 8 additions & 2 deletions src/third_party/mozjs-45/SConscript
Expand Up @@ -14,7 +14,7 @@ def removeIfPresent(lst, item):
except ValueError:
pass

for to_remove in ['-Werror', '-Wall', '-W']:
for to_remove in ['-Werror', '-Wall', '-W', '/W3']:
removeIfPresent(env['CCFLAGS'], to_remove)

# See what -D's show up in make. The AB_CD one might change, but we're little
Expand Down Expand Up @@ -55,7 +55,13 @@ if env.TargetOSIs('windows'):

# 'operation' : unsafe mix of type 'type' and type 'type' in operation
'/wd4805',
])

# 'reinterpret_cast': conversion from 'type' to 'type' of greater size
'/wd4312',

# 'operator': unsafe use of type 'type' in operation
'/wd4804'
])
else:
if env.TargetOSIs('solaris'):
env.Prepend(CCFLAGS=[
Expand Down
4 changes: 4 additions & 0 deletions src/third_party/murmurhash3/SConscript
Expand Up @@ -4,5 +4,9 @@ env = env.Clone()

env.InjectThirdPartyIncludePaths(libraries=['boost'])

if env.TargetOSIs('windows'):
# C4141: 'inline': used more than once
env.Append(CCFLAGS=['/wd4141'])

env.Append(CPPPATH=['#src', '$BUILD_DIR'])
env.Library("murmurhash3", ["MurmurHash3.cpp"])
5 changes: 5 additions & 0 deletions src/third_party/s2/SConscript
Expand Up @@ -25,6 +25,11 @@ env.Append(CCFLAGS=['-DDEBUG_MODE=false'])
if env.ToolchainIs('clang'):
env.Append(CCFLAGS=['-Wno-mismatched-tags'])

if env.TargetOSIs('windows'):
# C4996: 'memccpy': The POSIX name for this item is deprecated. Instead, use the ISO C and C++
# conformant name: _memccpy. See online help for details
env.Append(CCFLAGS=['/wd4996'])

env.Library( "s2",
[
"s1angle.cc",
Expand Down
5 changes: 5 additions & 0 deletions src/third_party/s2/util/coding/SConscript
Expand Up @@ -7,6 +7,11 @@ env = env.Clone()
env.Append(CCFLAGS=['-Isrc/third_party/s2'])
env.Append(CCFLAGS=['-Isrc/third_party/gflags-2.0/src'])

if env.TargetOSIs('windows'):
# C4996: 'memccpy': The POSIX name for this item is deprecated. Instead, use the ISO C and C++
# conformant name: _memccpy. See online help for details
env.Append(CCFLAGS=['/wd4996'])

env.Library(
"coding",
[
Expand Down
3 changes: 3 additions & 0 deletions src/third_party/s2/util/math/SConscript
Expand Up @@ -10,6 +10,9 @@ env.Append(CCFLAGS=['-Isrc/third_party/gflags-2.0/src'])
if env.TargetOSIs('solaris'):
# Enables declaration of isinf() on Solaris
env.Append(CPPDEFINES=['__C99FEATURES__'])
elif env.TargetOSIs('windows'):
# C4305: 'initializing': truncation from '...' to '...'
env.Append(CCFLAGS=['/wd4305'])

env.Library("math",
[ "mathutil.cc",
Expand Down
6 changes: 6 additions & 0 deletions src/third_party/snappy-1.1.3/SConscript
Expand Up @@ -8,6 +8,12 @@ env = env.Clone()
if env.TargetOSIs('linux'):
env.Append(CPPPATH=["build_linux"])
env.Append( CPPDEFINES=[ "HAVE_CONFIG_H", ] )
elif env.TargetOSIs('windows'):
# C4996: 'memccpy': The POSIX name for this item is deprecated. Instead, use the ISO C and C++
# conformant name: _memccpy. See online help for details
env.Append(CCFLAGS=['/wd4996'])
# C4018: '<': signed/unsigned mismatch
env.Append(CCFLAGS=['/wd4018'])
elif not env.TargetOSIs('windows'):
env.Append(CPPPATH=["build_posix"])
env.Append( CPPDEFINES=[ "HAVE_CONFIG_H", ] )
Expand Down
3 changes: 3 additions & 0 deletions src/third_party/timelib-2017.05beta10/SConscript
Expand Up @@ -15,6 +15,9 @@ try:
'-DHAVE_IO_H',
'-DHAVE_WINSOCK2_H',
])

# C4996: '...': was declared deprecated
env.Append(CCFLAGS=['/wd4996'])
elif env.TargetOSIs('solaris'):
env.AppendUnique(CCFLAGS=[
'-DHAVE_DIRENT_H',
Expand Down

0 comments on commit f13e5ad

Please sign in to comment.