From 84b58b2679d590770d56e5cdfe52abe500446769 Mon Sep 17 00:00:00 2001 From: "ch79.cho" Date: Wed, 7 Sep 2016 14:56:42 +0900 Subject: [PATCH] remove scons build warning from sample app gets function is changed to input function to remove warining. Change-Id: I1f2ad5c1962f81a2321597f078baf513a1b83227 Signed-off-by: ch79.cho Reviewed-on: https://gerrit.iotivity.org/gerrit/11481 Tested-by: jenkins-iotivity Reviewed-by: Hun-je Yeon Reviewed-by: Uze Choi --- .../examples/linux/notificationprovider.c | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/service/notification/examples/linux/notificationprovider.c b/service/notification/examples/linux/notificationprovider.c index 44dae6b..32c4f09 100644 --- a/service/notification/examples/linux/notificationprovider.c +++ b/service/notification/examples/linux/notificationprovider.c @@ -38,11 +38,11 @@ #include "cloud_connector.h" // Input the following values to publish resource to cloud -char REMOTE_SERVER_ADDRESS[50]; -char AUTH_PROVIDER[50]; -char AUTH_CODE[50]; -char UID[50]; -char ACCESS_TOKEN[50]; +char REMOTE_SERVER_ADDRESS[50] = {'\0',}; +char AUTH_PROVIDER[50] = {'\0',}; +char AUTH_CODE[50] = {'\0',}; +char UID[50] = {'\0',}; +char ACCESS_TOKEN[50] = {'\0',}; #endif char mainConsumer[37] = {'\0',}; @@ -318,20 +318,20 @@ int main() break; #ifdef WITH_CLOUD case 21: - printf("Enable Remote Service"); + printf("Enable Remote Service\n"); if(!IsCloudLoggedin()) { - printf("Login required"); + printf("Login required\n"); break; } - NSProviderEnableRemoteService(REMOTE_SERVER_ADDRESS); + NSProviderEnableRemoteService(REMOTE_SERVER_ADDRESS); break; case 22: - printf("Disable Remote Service"); + printf("Disable Remote Service\n"); if(!IsCloudLoggedin()) { - printf("Login required"); + printf("Login required\n"); break; } NSProviderDisableRemoteService(REMOTE_SERVER_ADDRESS); @@ -339,13 +339,13 @@ int main() case 31: printf("Remote Server Address: "); - gets(REMOTE_SERVER_ADDRESS); + input(REMOTE_SERVER_ADDRESS); printf("Auth Provider(eg. github): "); - gets(AUTH_PROVIDER); + input(AUTH_PROVIDER); printf("Auth Code: "); - gets(AUTH_CODE); + input(AUTH_CODE); OCCloudSignup(REMOTE_SERVER_ADDRESS, OCGetServerInstanceIDString(), AUTH_PROVIDER, AUTH_CODE, CloudSignupCallback); @@ -353,21 +353,21 @@ int main() break; case 32: printf("Remote Server Address: "); - gets(REMOTE_SERVER_ADDRESS); + input(REMOTE_SERVER_ADDRESS); printf("UID: "); - gets(UID); + input(UID); printf("ACCESS_TOKEN: "); - gets(ACCESS_TOKEN); + input(ACCESS_TOKEN); OCCloudLogin(REMOTE_SERVER_ADDRESS, UID, OCGetServerInstanceIDString(), ACCESS_TOKEN, CloudLoginoutCallback); - printf("OCCloudLogin requested"); + printf("OCCloudLogin requested\n"); break; case 33: OCCloudLogout(REMOTE_SERVER_ADDRESS, CloudLoginoutCallback); - printf("OCCloudLogin requested"); + printf("OCCloudLogin requested\n"); break; #endif case 0: -- 2.7.4