[IOT-2539] Fix format= warining
authorGeorge Nash <george.nash@intel.com>
Tue, 1 Aug 2017 17:18:56 +0000 (10:18 -0700)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 8 Sep 2017 11:59:22 +0000 (11:59 +0000)
The sscanf was using %lu flag that is a long unsigned int
while passing in a uint32_t value which is an unsigned int

This changes the flag from %lu to %u to clean the format
warning.

Change-Id: Iba1d10e2b2403fa5adb94650764ee04c290c951b
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21701
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit a86f7d8c1d6d4516b021a76c7bfd59b16ce3f027)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22181
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/src/rolesresource.c

index 4e9d511..097c2fd 100644 (file)
@@ -925,7 +925,7 @@ static OCEntityHandlerResult HandleDeleteRequest(OCEntityHandlerRequest *ehReque
         if (strncasecmp((const char *)parseIter.attrPos, OIC_JSON_CREDID_NAME,
             parseIter.attrLen) == 0)
         {
-            int ret = sscanf((const char *)parseIter.valPos, "%lu", &credId);
+            int ret = sscanf((const char *)parseIter.valPos, "%u", &credId);
             if (1 > ret)
             {
                 OIC_LOG_V(ERROR, TAG, "credId was not valid: %s", parseIter.valPos);
@@ -1329,4 +1329,4 @@ OCStackResult GetEndpointRoles(const CAEndpoint_t *endpoint, OicSecRole_t **role
     return OC_STACK_OK;
 }
 
-#endif /* defined(__WITH_DTLS__) || defined(__WITH_TLS__) */
\ No newline at end of file
+#endif /* defined(__WITH_DTLS__) || defined(__WITH_TLS__) */