diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-04-09 07:26:00 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2005-04-09 07:26:00 +0000 |
commit | 088c7cc48a6669b6508c1ee73b4d3861f952cdeb (patch) | |
tree | c605446006d7203690418bfb2e7427275de72530 | |
parent | b7facce05256a8e32b41bddea3d42b4ccd4c7822 (diff) | |
download | ATCD-088c7cc48a6669b6508c1ee73b4d3861f952cdeb.tar.gz |
ChangeLogTag:Sat Apr 9 00:23:50 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 20 | ||||
-rw-r--r-- | TAO/tao/Allocator.h | 9 | ||||
-rw-r--r-- | TAO/tao/TypeCodeFactory/Factory_Map.h | 43 | ||||
-rw-r--r-- | TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp | 45 | ||||
-rw-r--r-- | TAO/tao/Valuetype/ValueFactory_Map.cpp | 6 |
5 files changed, 73 insertions, 50 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 44218b0bef1..e61fbb31978 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,23 @@ +Sat Apr 9 00:23:50 2005 Ossama Othman <ossama@dre.vanderbilt.edu> + + * tao/Allocator.h (~TAO_Allocator): + + Added virtual destructor. Fixes "contains virtual functions but + non-virtual destructor" g++ 4.0 (CVS snapshot) warning. + + * tao/TypeCodeFactory/Factory_Map.h (factory_map): + * tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp + (extract_typecode): + + Moved TypeCode factory function map to extract_typecode() + method. Addresses unused variable warnings exhibited by a G++ + 4.0 CVS snapshot. + + * tao/Valuetype/ValueFactory_Map.cpp (rebind, unbind): + + Initialize variables. Addresses "variables may be used + unitialized" g++ 4.0 (CVS snapshot) warnings. + Sat Apr 9 00:02:16 2005 Ossama Othman <ossama@dre.vanderbilt.edu> * examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp diff --git a/TAO/tao/Allocator.h b/TAO/tao/Allocator.h index ffc07c92c1d..65d0465d4fe 100644 --- a/TAO/tao/Allocator.h +++ b/TAO/tao/Allocator.h @@ -31,9 +31,12 @@ namespace TAO template <typename handler_type> class TAO_Allocator { - public: - virtual handler_type *allocate () = 0; - virtual void release (handler_type *ptr) = 0; + public: + + virtual ~TAO_Allocator (void) {} + + virtual handler_type *allocate () = 0; + virtual void release (handler_type *ptr) = 0; }; } diff --git a/TAO/tao/TypeCodeFactory/Factory_Map.h b/TAO/tao/TypeCodeFactory/Factory_Map.h index 0b21e2141a9..fac5a97c618 100644 --- a/TAO/tao/TypeCodeFactory/Factory_Map.h +++ b/TAO/tao/TypeCodeFactory/Factory_Map.h @@ -142,49 +142,6 @@ namespace TAO bool tc_event_factory (CORBA::TCKind kind, TAO_InputCDR & cdr, CORBA::TypeCode_ptr & tc); - factory const factory_map[] = - { - tc_null_factory, - tc_void_factory, - tc_short_factory, - tc_long_factory, - tc_ushort_factory, - tc_ulong_factory, - tc_float_factory, - tc_double_factory, - tc_boolean_factory, - tc_char_factory, - tc_octet_factory, - tc_any_factory, - tc_TypeCode_factory, - tc_Principal_factory, - tc_objref_factory, - tc_struct_factory, - tc_union_factory, - tc_enum_factory, - tc_string_factory, - tc_sequence_factory, - tc_array_factory, - tc_alias_factory, - tc_except_factory, - tc_longlong_factory, - tc_ulonglong_factory, - tc_longdouble_factory, - tc_wchar_factory, - tc_wstring_factory, - tc_fixed_factory, - tc_value_factory, - tc_value_box_factory, - tc_native_factory, - tc_abstract_interface_factory, - tc_local_interface_factory, - tc_component_factory, - tc_home_factory, - tc_event_factory - - }; - - } // End namespace TypeCodeFactory } // End namespace TAO diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp index ac952f7d92e..b2fa4fa4c28 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_Adapter_Impl.cpp @@ -346,7 +346,50 @@ TAO_TypeCodeFactory_Adapter_Impl::extract_typecode (TAO_InputCDR & cdr, if (!(cdr >> kind) || kind >= CORBA::TAO_TC_KIND_COUNT) return false; - return TAO::TypeCodeFactory::factory_map[kind] (kind, cdr, tc); + using namespace TAO::TypeCodeFactory; + + static factory const factory_map[] = + { + tc_null_factory, + tc_void_factory, + tc_short_factory, + tc_long_factory, + tc_ushort_factory, + tc_ulong_factory, + tc_float_factory, + tc_double_factory, + tc_boolean_factory, + tc_char_factory, + tc_octet_factory, + tc_any_factory, + tc_TypeCode_factory, + tc_Principal_factory, + tc_objref_factory, + tc_struct_factory, + tc_union_factory, + tc_enum_factory, + tc_string_factory, + tc_sequence_factory, + tc_array_factory, + tc_alias_factory, + tc_except_factory, + tc_longlong_factory, + tc_ulonglong_factory, + tc_longdouble_factory, + tc_wchar_factory, + tc_wstring_factory, + tc_fixed_factory, + tc_value_factory, + tc_value_box_factory, + tc_native_factory, + tc_abstract_interface_factory, + tc_local_interface_factory, + tc_component_factory, + tc_home_factory, + tc_event_factory + }; + + return factory_map[kind] (kind, cdr, tc); } CORBA::TypeCode_ptr diff --git a/TAO/tao/Valuetype/ValueFactory_Map.cpp b/TAO/tao/Valuetype/ValueFactory_Map.cpp index 0e16b990347..42d1922dd64 100644 --- a/TAO/tao/Valuetype/ValueFactory_Map.cpp +++ b/TAO/tao/Valuetype/ValueFactory_Map.cpp @@ -39,8 +39,8 @@ TAO_ValueFactory_Map::rebind (const char *repo_id, { // ACE_READ_GUARD_RETURN (TAO_SYNCH_RW_MUTEX, guard, map_->mutex(),-1); // --- but must be recursive - const char *prev_repo_id; - CORBA::ValueFactory prev_factory; + const char *prev_repo_id = 0; + CORBA::ValueFactory prev_factory = 0; int ret = 0; ret = this->map_.rebind (CORBA::string_dup (repo_id), factory, @@ -65,7 +65,7 @@ int TAO_ValueFactory_Map::unbind (const char *repo_id, CORBA::ValueFactory &factory) { - FACTORY_MAP_MANAGER::ENTRY *prev_entry; + FACTORY_MAP_MANAGER::ENTRY *prev_entry = 0; int ret = 0; ret = this->map_.find (repo_id, prev_entry); |