IOT-1583: Disabling harmless /W4 warnings.
authorPawel Winogrodzki <pawelwi@microsoft.com>
Thu, 2 Mar 2017 10:23:23 +0000 (02:23 -0800)
committerMike Fenelon <mike.fenelon@microsoft.com>
Wed, 8 Mar 2017 20:25:09 +0000 (20:25 +0000)
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 <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17639
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
build_common/windows/SConscript
resource/csdk/security/SConscript

index 8906bdf..61fe357 100644 (file)
@@ -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'])
 
index 842471e..5eb8d2b 100644 (file)
@@ -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')