From 4c1e2be605756a32e040d88c34535b2ce44e649c Mon Sep 17 00:00:00 2001 From: Pawel Winogrodzki Date: Thu, 2 Mar 2017 02:23:23 -0800 Subject: [PATCH] IOT-1583: Disabling harmless /W4 warnings. In preparation for libcoap /W4 fixes we're disabling warnings, which do not cause any potential issues. Change-Id: I136b34f2d5824efcc052b2c7f3a0b8315c8f3f23 Signed-off-by: Pawel Winogrodzki Reviewed-on: https://gerrit.iotivity.org/gerrit/17639 Tested-by: jenkins-iotivity Reviewed-by: Phil Coval Reviewed-by: Alex Kelley Reviewed-by: Mike Fenelon --- build_common/windows/SConscript | 6 +++++- resource/csdk/security/SConscript | 6 ++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build_common/windows/SConscript b/build_common/windows/SConscript index 8906bdf..61fe357 100644 --- a/build_common/windows/SConscript +++ b/build_common/windows/SConscript @@ -14,7 +14,11 @@ if env['CC'] == 'cl': # - Disabled due to the widespread usage in IoTivity # - warning C4200: zero-sized array in struct/union. # - It is an acceptable approach for variable size structs. - env.AppendUnique(CCFLAGS=['/wd4127', '/wd4200']) + # - warning C4201: nameless struct/union + # - Disabled due to IoTivity not being ANSI compatible + # - warning C4214: bit field types other than int + # - Disabled due to IoTivity not being ANSI compatible + env.AppendUnique(CCFLAGS=['/wd4127', '/wd4200', '/wd4201', '/wd4214']) env.AppendUnique(CCFLAGS=['/EHsc']) diff --git a/resource/csdk/security/SConscript b/resource/csdk/security/SConscript index 842471e..5eb8d2b 100644 --- a/resource/csdk/security/SConscript +++ b/resource/csdk/security/SConscript @@ -59,12 +59,10 @@ libocsrm_env.PrependUnique(CPPPATH = [ if target_os in ['windows', 'msys_nt']: libocsrm_env.AppendUnique(LIBPATH = [os.path.join(libocsrm_env.get('BUILD_DIR'), 'resource', 'oc_logger')]) - # Enable W4 but disable the following warnings: - # - warning C4201: nonstandard extension used: nameless struct/union - # - Disabled due to the widespread usage in internal IoTivity components as well as external libs. + # Enable W4 but disable the following warning: # - warning C4232: nonstandard extension used: 'read': address of dllimport 'fread' is not static, identity not guaranteed # - fread, frwrite, etc are provided by the platform and cannot be changed. - libocsrm_env.AppendUnique(CCFLAGS=['/wd4201', '/wd4232', '/W4', '/WX']) + libocsrm_env.AppendUnique(CCFLAGS=['/wd4232', '/W4', '/WX']) if target_os in ['linux', 'android', 'tizen', 'msys_nt', 'windows'] and libocsrm_env.get('SECURED') == '1': SConscript('provisioning/SConscript', 'libocsrm_env') -- 2.7.4