IOT-2539 Fix format warning 73/22873/2
authorGeorge Nash <george.nash@intel.com>
Tue, 17 Oct 2017 17:38:16 +0000 (10:38 -0700)
committerRick Bell <richard.s.bell@intel.com>
Wed, 18 Oct 2017 16:42:41 +0000 (16:42 +0000)
C99 spec suggests the type long long int should
be at least 64 bits but may be more.  On some
platfroms it might be 128-bits. In printf %lld
could be interpreted as 64-bits or 128-bits

To fix this the PRId64 macro from inttypes can
be used.

Bug: https://jira.iotivity.org/browse/IOT-2539
Bug: https://jira.iotivity.org/browse/IOT-2817
Change-Id: Ie25ea50630f97b4dde866d8042af1567b18522d9
Signed-off-by: George Nash <george.nash@intel.com>
service/easy-setup/sampleapp/enrollee/linux/easysetup_x.c

index bf104a9..69e18e8 100644 (file)
@@ -24,6 +24,7 @@
 #include "oic_malloc.h"
 #include "logger.h"
 #include "ocpayload.h"
+#include <inttypes.h>
 
 /**
  * @var ESX_ENROLLEE_TAG
@@ -58,7 +59,7 @@ void ReadUserdataCb(OCRepPayload* payload, char* resourceType, void** userdata)
                     *userdata = (void*)OICMalloc(sizeof(UserProperties));
                     ((UserProperties*)(*userdata))->userValue_int = value;
                 }
-                OIC_LOG_V(INFO, ESX_ENROLLEE_TAG, "[User specific property] %s : %lld",
+                OIC_LOG_V(INFO, ESX_ENROLLEE_TAG, "[User specific property] %s : %" PRId64,
                                                                             USERPROPERTY_KEY_INT, value);
                 g_userProperties.userValue_int = value;
             }