From: David Antler Date: Fri, 21 Oct 2016 17:38:19 +0000 (-0700) Subject: Treat Visual Studio C4133 warning as error X-Git-Tag: 1.3.0~1053^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=180df296489d21a4f93fea3182cc11af520c3e47;p=platform%2Fupstream%2Fiotivity.git Treat Visual Studio C4133 warning as error Change-Id: I9cc9019fb90d38913151b9d6678f359ca35c06a4 Signed-off-by: David Antler Reviewed-on: https://gerrit.iotivity.org/gerrit/13567 Tested-by: jenkins-iotivity Reviewed-by: Dan Mihai Reviewed-by: Dave Thaler Reviewed-by: Kevin Kane Reviewed-by: Randeep Singh --- diff --git a/build_common/windows/SConscript b/build_common/windows/SConscript index f8a3fb5..e6f6c84 100644 --- a/build_common/windows/SConscript +++ b/build_common/windows/SConscript @@ -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 diff --git a/resource/csdk/security/src/credresource.c b/resource/csdk/security/src/credresource.c index c47f39f..a295bf7 100644 --- a/resource/csdk/security/src/credresource.c +++ b/resource/csdk/security/src/credresource.c @@ -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;