projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git]
/
service
/
resource-container
/
examples
/
BMISensorBundle
/
src
/
BMISensor.cpp
diff --git
a/service/resource-container/examples/BMISensorBundle/src/BMISensor.cpp
b/service/resource-container/examples/BMISensorBundle/src/BMISensor.cpp
index
6bf73e1
..
53e96cf
100644
(file)
--- a/
service/resource-container/examples/BMISensorBundle/src/BMISensor.cpp
+++ b/
service/resource-container/examples/BMISensorBundle/src/BMISensor.cpp
@@
-52,7
+52,7
@@
BMISensor::~BMISensor()
int BMISensor::executeBMISensorLogic(std::map<std::string, std::string> *pInputData,
std::string *pOutput)
{
int BMISensor::executeBMISensorLogic(std::map<std::string, std::string> *pInputData,
std::string *pOutput)
{
- BMIResult result;
+ BMIResult result
= ERROR
;
if (pInputData->find("weight") != pInputData->end())
{
if (pInputData->find("weight") != pInputData->end())
{
@@
-81,10
+81,12
@@
int BMISensor::executeBMISensorLogic(std::map<std::string, std::string> *pInputD
*/
BMIResult BMISensor::makeBMI(void)
{
*/
BMIResult BMISensor::makeBMI(void)
{
- double BMIvalue, timediffsecond;
- double dWeight, dHeight;
+ double BMIvalue = 0.0;
+ double timediffsecond = 0.0;
+ double dWeight = 0.0;
+ double dHeight = 0.0;
- int BMIResult;
+ int BMIResult
= 0
;
if (!m_weight.empty() && !m_height.empty())
{
if (!m_weight.empty() && !m_height.empty())
{
@@
-147,4
+149,4
@@
BMIResult BMISensor::makeBMI(void)
}
return ERROR;
}
return ERROR;
-}
\ No newline at end of file
+}