summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2012-03-07 15:26:40 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2012-03-07 15:26:40 +0000
commit229868824299b78bbd15207f3888752296a54091 (patch)
tree1fd8a1f1d9edf4b92c18f62f1398fd16fd70f63a /TAO
parenta045278199c1b0b2a9439feefb98549adac37f91 (diff)
downloadATCD-229868824299b78bbd15207f3888752296a54091.tar.gz
Wed Mar 7 15:27:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com>
Coverity problems corrected
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/tao/DynamicAny/DynCommon.cpp8
-rw-r--r--TAO/tao/DynamicAny/DynEnum_i.cpp1
-rw-r--r--TAO/tao/DynamicAny/DynUnion_i.cpp1
-rw-r--r--TAO/tao/DynamicAny/DynValueBox_i.cpp4
-rw-r--r--TAO/tao/DynamicAny/DynValueCommon_i.cpp1
-rw-r--r--TAO/tests/DynValue_Test/Analyzer.cpp13
7 files changed, 30 insertions, 8 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index bc1e14bc2bc..a05d7861e0e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,13 @@
+Wed Mar 7 15:27:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com>
+
+ * tests/DynValue_Test/Analyzer.cpp:
+ * tao/DynaicAny/DynCommon.cpp:
+ * tao/DynaicAny/DynEnum_i.cpp:
+ * tao/DynaicAny/DynValueCommon_i.cpp:
+ * tao/DynaicAny/DynValueBox_i.cpp:
+ * tao/DynaicAny/DynUnion_i.cpp:
+ Coverity problems addressed.
+
Wed Mar 7 14:16:30 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* tao/IFR_Client/IFR_Base.pidl:
diff --git a/TAO/tao/DynamicAny/DynCommon.cpp b/TAO/tao/DynamicAny/DynCommon.cpp
index 3438fc983f6..a6989e68680 100644
--- a/TAO/tao/DynamicAny/DynCommon.cpp
+++ b/TAO/tao/DynamicAny/DynCommon.cpp
@@ -26,7 +26,13 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_DynCommon::TAO_DynCommon (CORBA::Boolean allow_truncation)
- : allow_truncation_ (allow_truncation)
+ : ref_to_component_ (false)
+ , container_is_destroying_ (false)
+ , has_components_ (false)
+ , destroyed_ (false)
+ , current_position_ (-1)
+ , component_count_ (0)
+ , allow_truncation_ (allow_truncation)
{
}
diff --git a/TAO/tao/DynamicAny/DynEnum_i.cpp b/TAO/tao/DynamicAny/DynEnum_i.cpp
index 76298dc8e53..3df1b8365ad 100644
--- a/TAO/tao/DynamicAny/DynEnum_i.cpp
+++ b/TAO/tao/DynamicAny/DynEnum_i.cpp
@@ -14,6 +14,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_DynEnum_i::TAO_DynEnum_i (CORBA::Boolean allow_truncation)
: TAO_DynCommon (allow_truncation)
+ , value_ (0u)
{
}
diff --git a/TAO/tao/DynamicAny/DynUnion_i.cpp b/TAO/tao/DynamicAny/DynUnion_i.cpp
index b19832b4ceb..2916277ea96 100644
--- a/TAO/tao/DynamicAny/DynUnion_i.cpp
+++ b/TAO/tao/DynamicAny/DynUnion_i.cpp
@@ -16,6 +16,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_DynUnion_i::TAO_DynUnion_i (CORBA::Boolean allow_truncation)
: TAO_DynCommon (allow_truncation)
+ , member_slot_ (0u)
{
}
diff --git a/TAO/tao/DynamicAny/DynValueBox_i.cpp b/TAO/tao/DynamicAny/DynValueBox_i.cpp
index 1b0346c708a..e083f67eba5 100644
--- a/TAO/tao/DynamicAny/DynValueBox_i.cpp
+++ b/TAO/tao/DynamicAny/DynValueBox_i.cpp
@@ -15,7 +15,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_DynValueBox_i::TAO_DynValueBox_i (CORBA::Boolean allow_truncation)
: TAO_DynCommon (allow_truncation)
- , TAO_DynAny_i(allow_truncation)
+ , TAO_DynAny_i (allow_truncation)
, TAO_DynValueCommon_i (allow_truncation)
{
}
@@ -202,7 +202,7 @@ TAO_DynValueBox_i::equal (DynamicAny::DynAny_ptr rhs)
DynamicAny::DynValueBox_ptr rhs_v=
dynamic_cast<DynamicAny::DynValueBox_ptr> (rhs);
- if (this->is_null () != rhs_v->is_null ())
+ if (!rhs_v || this->is_null () != rhs_v->is_null ())
{
return false;
}
diff --git a/TAO/tao/DynamicAny/DynValueCommon_i.cpp b/TAO/tao/DynamicAny/DynValueCommon_i.cpp
index 76373fb3aec..3f0d17f94c8 100644
--- a/TAO/tao/DynamicAny/DynValueCommon_i.cpp
+++ b/TAO/tao/DynamicAny/DynValueCommon_i.cpp
@@ -15,6 +15,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
TAO_DynValueCommon_i::TAO_DynValueCommon_i (CORBA::Boolean allow_truncation)
: TAO_DynCommon (allow_truncation)
, TAO_DynAny_i (allow_truncation)
+ , is_null_ (true)
{
}
diff --git a/TAO/tests/DynValue_Test/Analyzer.cpp b/TAO/tests/DynValue_Test/Analyzer.cpp
index b229ba339f8..f248b6d8165 100644
--- a/TAO/tests/DynValue_Test/Analyzer.cpp
+++ b/TAO/tests/DynValue_Test/Analyzer.cpp
@@ -51,11 +51,14 @@ DynAnyAnalyzer::register_factory (
{
factory_id * new_fact (
dynamic_cast<factory_id *> (factory.in()) );
- tab("Registering factory for ValueType ");
- ACE_DEBUG ((LM_DEBUG, "%C\n", new_fact->id ()));
- CORBA::ValueFactoryBase_var old_fact (
- orb_->register_value_factory (
- new_fact->id (), factory.in () ) );
+ if (new_fact)
+ {
+ tab("Registering factory for ValueType ");
+ ACE_DEBUG ((LM_DEBUG, "%C\n", new_fact->id ()));
+ CORBA::ValueFactoryBase_var old_fact (
+ orb_->register_value_factory (
+ new_fact->id (), factory.in () ) );
+ }
}
void