Fix for result of static analysis.
authorKIM JungYong <jyong2.kim@samsung.com>
Wed, 30 Nov 2016 06:08:29 +0000 (15:08 +0900)
committerUze Choi <uzchoi@samsung.com>
Mon, 5 Dec 2016 06:36:20 +0000 (06:36 +0000)
commit0d5544bc1938a9e4b9be416e424c9265efc53549
treede8f8003d24f9ccd99fca5fa18cef9b1224e7df1
parentf42055eb5df8e16dfdfef0b98f8d645161140acd
Fix for result of static analysis.

In this patch, incorrect coding rule is fixed and resolved warning of static analysis.
1. Uninitialized variables is fixed with initialized.
2. Invalid bracket location is fixed.
3. Incorrect division with zero is prevented.
4. Incorrect referenced pointer is prevented.

Change-Id: I715d671241f3d48a1174c49cbe34074b31a50f02
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14947
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
20 files changed:
service/resource-container/examples/BMISensorBundle/src/BMISensor.cpp
service/resource-container/examples/BMISensorBundle/src/inputSensors/HeightSensorApp/src/HeightSensorApp.cpp
service/resource-container/examples/BMISensorBundle/src/inputSensors/WeightSensorApp/src/WeightSensorApp.cpp
service/resource-container/examples/ContainerSample.cpp
service/resource-container/examples/DiscomfortIndexSensorBundle/src/DiscomfortIndexSensor.cpp
service/resource-container/examples/DiscomfortIndexSensorBundle/src/DiscomfortIndexSensorResource.cpp
service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp/src/ThingResourceServer.cpp
service/resource-container/examples/DiscomfortIndexSensorBundle/src/inputSensors/THSensorApp1/src/ThingResourceServer1.cpp
service/resource-container/examples/HueSampleBundle/src/HueConnector.cpp
service/resource-container/src/Configuration.cpp
service/resource-container/src/ResourceContainerImpl.cpp
service/resource-container/unittests/ResourceContainerTest.cpp
service/resource-encapsulation/examples/linux/NestedAttributesClient.cpp
service/resource-encapsulation/examples/linux/NestedAttributesServer.cpp
service/resource-encapsulation/examples/linux/SampleResourceClient.cpp
service/resource-encapsulation/examples/linux/SampleResourceServer.cpp
service/resource-encapsulation/examples/linux/SeparateResponseServer.cpp
service/resource-encapsulation/src/common/expiryTimer/unittests/ExpiryTimerTest.cpp
service/resource-encapsulation/src/resourceBroker/unittest/ResourceBrokerUnitTest.cpp
service/resource-encapsulation/src/resourceBroker/unittest/ResourcePresenceUnitTest.cpp