Fix build warning on Notification service. 15/20215/2
authorKIM JungYong <jyong2.kim@samsung.com>
Mon, 22 May 2017 06:23:26 +0000 (15:23 +0900)
committerUze Choi <uzchoi@samsung.com>
Mon, 22 May 2017 06:32:45 +0000 (06:32 +0000)
1. unused parameters is resolved.
2. implicit using of functions is fixed as including owned header.
3. print format is fixed.

Change-Id: I240ac626f6ed9f1aa02db7980ba657ae666653e9
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20215
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
service/notification/examples/linux/cloud_connector.c
service/notification/src/provider/NSProviderResource.c

index 2fcdf09..99190d5 100644 (file)
@@ -20,6 +20,7 @@
 
 /// This sample provides the way to create cloud sample
 
+#include <string.h>
 #include "ocstack.h"
 #include "ocpayload.h"
 #include "rd_client.h"
@@ -137,7 +138,7 @@ void printRepresentation(OCRepPayloadValue *value)
                         printf("Value: None\n");
                         break;
                 case OCREP_PROP_INT:
-                        printf("Value: %d\n", value->i);
+                        printf("Value: %ld\n", value->i);
                         break;
                 case OCREP_PROP_DOUBLE:
                         printf("Value: %f\n", value->d);
@@ -168,6 +169,7 @@ void printRepresentation(OCRepPayloadValue *value)
 OCStackApplicationResult CloudSignupCallback(void *ctx,
         OCDoHandle handle, OCClientResponse *clientResponse)
 {
+    (void) handle;
     if (ctx != (void *)DEFAULT_CONTEXT_VALUE)
     {
         printf("Invalid Cloud Login/out callback received\n");
@@ -192,6 +194,7 @@ OCStackApplicationResult CloudSignupCallback(void *ctx,
 OCStackApplicationResult CloudLoginoutCallback(void *ctx,
         OCDoHandle handle, OCClientResponse *clientResponse)
 {
+    (void) handle;
     if (ctx != (void *)DEFAULT_CONTEXT_VALUE)
     {
         printf("Invalid Cloud Login/out callback received\n");
index b5d8cb5..15bce8c 100644 (file)
@@ -18,8 +18,9 @@
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include "NSProviderResource.h"
+#include <inttypes.h>
 #include <string.h>
+#include "NSProviderResource.h"
 #include "rd_client.h"
 
 NSNotificationResource NotificationResource;
@@ -34,6 +35,7 @@ OCStackApplicationResult NSHandlePublishCb(void *ctx, OCDoHandle handle,
     OCClientResponse *clientResponse)
 {
     (void) handle;
+    (void) clientResponse;
     if (ctx != (void *)DEFAULT_CONTEXT_VALUE)
     {
         NS_LOG(DEBUG, "Invalid Publish callback received");