This patch fixes the "(error) Returning reference to auto variable" issue reported
by cppcheck tool in resource-encapsulation/src/resourceContainer/src dir.
Change-Id: Idade3fb288f7571276274cccb30728cf46851ac6
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3397
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
(cherry picked from commit
3a681a107a78bd3d36201bcd3cbfcb46500cc813)
Reviewed-on: https://gerrit.iotivity.org/gerrit/3473
}
}
-RCSResourceAttributes & JavaBundleResource::handleGetAttributesRequest(){
- RCSResourceAttributes ret;
+RCSResourceAttributes & JavaBundleResource::handleGetAttributesRequest()
+{
std::list<string> attrsNames = getAttributeNames();
for(std::list<string>::iterator iterator = attrsNames.begin();
- iterator != attrsNames.end(); ++iterator ){
- ret[*iterator] = handleGetAttributeRequest(*iterator);
+ iterator != attrsNames.end(); ++iterator )
+ {
+ handleGetAttributeRequest(*iterator);
}
- return ret;
+ return BundleResource::getAttributes();
}
#endif