diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index_T.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index_T.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index_T.cpp b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index_T.cpp index 846f5a191ef..0a703a0d43a 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Context_Index_T.cpp @@ -128,9 +128,6 @@ TAO_Persistent_Context_Index<ACE_MEM_POOL_2, ACE_LOCK>::open (LPCTSTR file_name, template <ACE_MEM_POOL_1, class ACE_LOCK> int TAO_Persistent_Context_Index<ACE_MEM_POOL_2, ACE_LOCK>::init (void) { - // Return value of this function (necessary to keep compilers quiet). - int status = 0; - if (index_->current_size () == 0) // CASE 1:there are no Naming Contexts registered. We need to create // one. @@ -184,9 +181,7 @@ TAO_Persistent_Context_Index<ACE_MEM_POOL_2, ACE_LOCK>::init (void) this->bind ("NameService", c_impl->counter_, c_impl->context_.map ()); - - // Everything went successfully. - status = 0; + return 0; } ACE_CATCHANY { @@ -195,13 +190,15 @@ TAO_Persistent_Context_Index<ACE_MEM_POOL_2, ACE_LOCK>::init (void) } ACE_ENDTRY; ACE_CHECK_RETURN (-1); + + // Below will never be reached, but the compiler is not smart to + // figure it out. This will keep the warnings away. + return -1; } else // CASE 2:Recreate all Naming Contexts. - status = recreate_all (); - - return status; + return recreate_all (); } template <ACE_MEM_POOL_1, class ACE_LOCK> int |