Treat Visual Studio C4133 warning as error
authorDavid Antler <david.a.antler@intel.com>
Fri, 21 Oct 2016 17:38:19 +0000 (10:38 -0700)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 18 Nov 2016 06:37:06 +0000 (06:37 +0000)
Change-Id: I9cc9019fb90d38913151b9d6678f359ca35c06a4
Signed-off-by: David Antler <david.a.antler@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13567
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
build_common/windows/SConscript
resource/csdk/security/src/credresource.c

index f8a3fb5..e6f6c84 100644 (file)
@@ -19,6 +19,10 @@ if env['CC'] == 'cl':
         '/wd4365',   # C4365 signed/unsigned mismatch
         '/wd4503'])  # C4503 decorated name length exceeded, name was truncated
 
+    # Enable warnings as errors.
+    env.AppendUnique(CCFLAGS=[
+        '/we4133'])  # C4133 incompatible type conversion
+
     env.AppendUnique(CCFLAGS=['/EHsc'])
 
     # Set release/debug flags
index c47f39f..a295bf7 100644 (file)
@@ -1338,6 +1338,8 @@ static int CmpCredId(const OicSecCred_t * first, const OicSecCred_t *second)
 static uint16_t GetCredId()
 {
     //Sorts credential list in incremental order of credId
+    /** @todo: Remove pragma for VS2013 warning; Investigate fixing LL_SORT macro */
+    #pragma warning(suppress:4133)
     LL_SORT(gCred, CmpCredId);
 
     OicSecCred_t *currentCred = NULL, *credTmp = NULL;