Removed build warning: Two different environments in C++ wrapper
authorAbitha Shankar <abitha.s@samsung.com>
Wed, 7 Sep 2016 11:54:05 +0000 (17:24 +0530)
committerMadan Lanka <lanka.madan@samsung.com>
Thu, 8 Sep 2016 04:47:55 +0000 (04:47 +0000)
Removed unUsed variable warnings
Removed warnings for printing variables

Change-Id: I5d6ba48df298c91f46ba7388ea355bc6a833a679
Signed-off-by: Abitha Shankar <abitha.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11501
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/notification/cpp-wrapper/consumer/SConscript
service/notification/cpp-wrapper/consumer/src/NSConsumerService.cpp
service/notification/cpp-wrapper/consumer/src/NSProvider.cpp
service/notification/cpp-wrapper/provider/SConscript
service/notification/cpp-wrapper/provider/src/NSProviderService.cpp

index 9244922..e476623 100755 (executable)
@@ -79,14 +79,19 @@ if env.get('WITH_CLOUD') == True:
 ######################################################################
 # Source files and Targets
 ######################################################################
+Import('notificationCommonStaticObjs')
+Import('notificationCommonSharedObjs')
 
 notification_consumer_src = [
-       env.Glob('src/*.cpp'),env.Glob('../common/*.cpp')]
+       env.Glob('src/*.cpp'),notificationCommonSharedObjs]
 
 consumersdk = notification_env.SharedLibrary('notification_consumer_wrapper', notification_consumer_src)
 notification_env.InstallTarget(consumersdk, 'libnotification_consumer_wrapper')
 notification_env.UserInstallTargetLib(consumersdk, 'libnotification_consumer_wrapper')
 
+notification_consumer_src = [
+       env.Glob('src/*.cpp'),notificationCommonStaticObjs]
+
 consumersdk = notification_env.StaticLibrary('notification_consumer_wrapper', notification_consumer_src)
 notification_env.InstallTarget(consumersdk, 'libnotification_consumer_wrapper')
 notification_env.UserInstallTargetLib(consumersdk, 'libnotification_consumer_wrapper')
index 2c083e3..1399e70 100755 (executable)
@@ -125,7 +125,7 @@ namespace OIC
 \r
             NSMessage *nsMessage = new NSMessage(message);\r
 \r
-            NS_LOG_V(DEBUG, "getAcceptedProviders Size : %d",\r
+            NS_LOG_V(DEBUG, "getAcceptedProviders Size : %d", (int)\r
                      NSConsumerService::getInstance()->getAcceptedProviders().size());\r
             for (auto it : NSConsumerService::getInstance()->getAcceptedProviders())\r
             {\r
@@ -217,6 +217,7 @@ namespace OIC
         NSResult NSConsumerService::enableRemoteService(const std::string &serverAddress)\r
         {\r
             NS_LOG(DEBUG, "enableRemoteService - IN");\r
+            NS_LOG_V(DEBUG, "Server Address : %s", serverAddress.c_str());\r
             NSResult result = NSResult::ERROR;\r
 #ifdef WITH_CLOUD\r
             result = (NSResult) NSConsumerEnableRemoteService(OICStrdup(serverAddress.c_str()));\r
index e00e151..efce8e5 100755 (executable)
@@ -154,7 +154,7 @@ namespace OIC
                 while (iter)\r
                 {\r
                     NS_LOG_V(DEBUG, "Topic Name : %s", iter->topicName);\r
-                    NS_LOG_V(DEBUG, "Topic State : %d", iter->state);\r
+                    NS_LOG_V(DEBUG, "Topic State : %d", (int) iter->state);\r
                     iter = iter->next;\r
                 }\r
             }\r
index 0ead67f..040dd21 100755 (executable)
@@ -78,14 +78,33 @@ if env.get('WITH_CLOUD') == True:
 ######################################################################
 # Source files and Targets
 ######################################################################
+notificationCommonStaticObjs = [
+       notification_env.Object('../common/NSMediaContents.cpp'),
+       notification_env.Object('../common/NSMessage.cpp'),
+       notification_env.Object('../common/NSSyncInfo.cpp'),
+       notification_env.Object('../common/NSTopic.cpp'),
+       notification_env.Object('../common/NSTopicsList.cpp')]
+
+notificationCommonSharedObjs = [
+       notification_env.SharedObject('../common/NSMediaContents.cpp'),
+       notification_env.SharedObject('../common/NSMessage.cpp'),
+       notification_env.SharedObject('../common/NSSyncInfo.cpp'),
+       notification_env.SharedObject('../common/NSTopic.cpp'),
+       notification_env.SharedObject('../common/NSTopicsList.cpp')]
 
 notification_provider_src = [
-       env.Glob('src/*.cpp'),env.Glob('../common/*.cpp')]
+       env.Glob('src/*.cpp'),notificationCommonSharedObjs]
 
 providersdk = notification_env.SharedLibrary('notification_provider_wrapper', notification_provider_src)
 notification_env.InstallTarget(providersdk, 'libnotification_provider_wrapper')
 notification_env.UserInstallTargetLib(providersdk, 'libnotification_provider_wrapper')
 
+notification_provider_src = [
+       env.Glob('src/*.cpp'),notificationCommonStaticObjs]
+
 providersdk = notification_env.StaticLibrary('notification_provider_wrapper', notification_provider_src)
 notification_env.InstallTarget(providersdk, 'libnotification_provider_wrapper')
 notification_env.UserInstallTargetLib(providersdk, 'libnotification_provider_wrapper')
+
+Export('notificationCommonStaticObjs')
+Export('notificationCommonSharedObjs')
index 2e180ae..4e943ae 100755 (executable)
@@ -122,6 +122,7 @@ namespace OIC
         NSResult NSProviderService::enableRemoteService(const std::string &serverAddress)\r
         {\r
             NS_LOG(DEBUG, "enableRemoteService - IN");\r
+            NS_LOG_V(DEBUG, "Server Address : %s", serverAddress.c_str());\r
             NSResult result = NSResult::ERROR;\r
 #ifdef WITH_CLOUD\r
             result = (NSResult) NSProviderEnableRemoteService(OICStrdup(serverAddress.c_str()));\r
@@ -135,6 +136,7 @@ namespace OIC
         NSResult NSProviderService::disableRemoteService(const std::string &serverAddress)\r
         {\r
             NS_LOG(DEBUG, "disableRemoteService - IN");\r
+            NS_LOG_V(DEBUG, "Server Address : %s", serverAddress.c_str());\r
             NSResult result = NSResult::ERROR;\r
 #ifdef WITH_CLOUD\r
             result = (NSResult) NSProviderDisableRemoteService(OICStrdup(serverAddress.c_str()));\r
@@ -180,7 +182,7 @@ namespace OIC
             ::NSMessage *message = NSCreateMessage();\r
             NSMessage *nsMessage = new NSMessage(message);\r
 \r
-            NS_LOG_V(DEBUG, "Message ID : %lld", nsMessage->getMessageId());\r
+            NS_LOG_V(DEBUG, "Message ID : %lld", (long long int) nsMessage->getMessageId());\r
             NS_LOG_V(DEBUG, "Provider ID : %s", nsMessage->getProviderId().c_str());\r
             NS_LOG(DEBUG, "createMessage - OUT");\r
 \r