Fix warning codes
authorch79.cho <ch79.cho@samsung.com>
Wed, 21 Sep 2016 08:32:29 +0000 (17:32 +0900)
committerUze Choi <uzchoi@samsung.com>
Wed, 28 Sep 2016 23:25:09 +0000 (23:25 +0000)
2 warnings are fixed.
1. warning implicit declaration of function
1. warning ignoring return value of 'scanf'

Change-Id: Id7e5caa3902b9a5b4be04b383b4ef54a2b8a68df
Signed-off-by: ch79.cho <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12043
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit cbe6796c41a31510e1d89d22a988a6f3c2a00841)
Reviewed-on: https://gerrit.iotivity.org/gerrit/12461

service/notification/examples/linux/notificationconsumer.c
service/notification/src/provider/NSProviderSystem.h

index 603c0d855788cd26d4e244bc6c7aea4cf91a5d46..679b11349274883b98537b128c14885d5994b13b 100644 (file)
@@ -177,9 +177,16 @@ int main(void)
 
         printf("Input: ");
 
-        scanf("%d", &num);
+        if(scanf("%d", &num) == EOF)
+        {
+            printf("Fail to input num\n");
+        }
         fflush(stdin);
-        scanf("%c", &dummy);
+
+        if(scanf("%c", &dummy) == EOF)
+        {
+            printf("Fail to input dummy\n");
+        }
         fflush(stdin);
 
         switch (num)
index a799a70d5e698b98cf28e3c5b2edaf2163cf2e0c..af5431916706c6425a56bf3db34450879dbd5065 100644 (file)
@@ -38,5 +38,6 @@ NSProviderInfo * NSGetProviderInfo();
 const char * NSGetUserInfo();\r
 bool NSGetPolicy();\r
 void NSSetPolicy(bool policy);\r
+bool NSGetResourceSecurity();\r
 \r
 #endif /* _NS_PROVIDER_SYSTEM__H_ */\r