[IOT-2808]Static Analysis warning fixes for SM. 99/22799/2
authorabitha.s <abitha.s@samsung.com>
Thu, 12 Oct 2017 10:43:48 +0000 (16:13 +0530)
committerAshok Babu Channa <ashok.channa@samsung.com>
Mon, 16 Oct 2017 18:24:37 +0000 (18:24 +0000)
1. Indentation fixes.
2. Uninitialized variable fixes

Change-Id: Icfeb1b998be90411e6f1c16d37f79ef0a47f699c
Signed-off-by: abitha.s <abitha.s@samsung.com>
service/scene-manager/sampleapp/linux/sceneclient.cpp
service/scene-manager/sampleapp/linux/sceneserver.cpp
service/scene-manager/src/Scene.cpp
service/scene-manager/src/SceneCollection.cpp
service/scene-manager/src/SceneCollectionResource.h
service/scene-manager/src/SceneMemberResource.h

index e9e3b1d..1236338 100644 (file)
@@ -265,7 +265,7 @@ int processUserInput(int min, int max)
 {
     assert(min <= max);
 
-    int input;
+    int input = 0;
 
     std::cin >> input;
 
index 590f09f..d606d8c 100644 (file)
@@ -91,7 +91,7 @@ int processUserInput(int min, int max)
 {
     assert(min <= max);
 
-    int input;
+    int input = 0;
 
     std::cin >> input;
 
index ec364cd..dc0378f 100644 (file)
@@ -30,7 +30,9 @@ namespace OIC
     {
         Scene::Scene(const std::string& sceneName,
                 SceneCollectionResource::Ptr sceneCollectionResource) :
-                m_name(sceneName), m_sceneCollectionResource(sceneCollectionResource) {}
+                m_name(sceneName), m_sceneCollectionResource(sceneCollectionResource)
+        {
+        }
 
         SceneAction::Ptr Scene::addNewSceneAction(
                const RCSRemoteResourceObject::Ptr& pRCSRemoteResourceObject,
index 789c79b..a834458 100644 (file)
@@ -28,7 +28,9 @@ namespace OIC
     {
         SceneCollection::SceneCollection(
                 const SceneCollectionResource::Ptr& sceneCollectionResource) :
-                m_sceneCollectionResource(sceneCollectionResource) {}
+                m_sceneCollectionResource(sceneCollectionResource)
+        {
+        }
 
         Scene::Ptr SceneCollection::addNewScene(const std::string& sceneName)
         {
index c0c9c69..bd22a82 100644 (file)
@@ -78,7 +78,9 @@ namespace OIC
                 typedef std::shared_ptr<SceneExecuteResponseHandler> Ptr;
 
                 SceneExecuteResponseHandler()
-                : m_numOfMembers(0), m_responseMembers(0), m_errorCode(0) { }
+                : m_numOfMembers(0), m_responseMembers(0), m_errorCode(0)
+                {
+                }
                 ~SceneExecuteResponseHandler() = default;
 
                 int m_numOfMembers;
index cac6ebf..47a25fa 100644 (file)
@@ -61,7 +61,9 @@ namespace OIC
                         const std::string & scene,
                         const std::string & keyName,
                         const RCSResourceAttributes::Value & val)
-                :sceneName(scene), key(keyName), value(val) { }
+                :sceneName(scene), key(keyName), value(val)
+                {
+                }
 
                 MappingInfo(MappingInfo &&) = default;
                 MappingInfo(const MappingInfo &) = default;