Skip to content

Commit

Permalink
Merge pull request #293 from jwillemsen/master
Browse files Browse the repository at this point in the history
Fixed Coverity reported issues
  • Loading branch information
jwillemsen committed Sep 14, 2016
2 parents a49ca87 + 4ebc48a commit 07ca9f7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
1 change: 0 additions & 1 deletion ACE/ACEXML/common/SAXExceptions.cpp
Expand Up @@ -111,7 +111,6 @@ ACEXML_SAXNotSupportedException::ACEXML_SAXNotSupportedException (const ACEXML_C

ACEXML_SAXNotSupportedException::~ACEXML_SAXNotSupportedException (void)
{
delete[] this->message_;
}


Expand Down
1 change: 1 addition & 0 deletions ACE/tests/Compiler_Features_21_Test.cpp
Expand Up @@ -17,6 +17,7 @@ struct A
struct B
{
B() : b(new A<int>[0]) {}
~B() { delete [] b; }
A<int> *b;
};

Expand Down
11 changes: 8 additions & 3 deletions TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
Expand Up @@ -651,9 +651,14 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party,

if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) TAO_StreamCtrl::create_B: succeeded\n"));

if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG,
"\n(%P|%t)stream_endpoint_b_ = %s",
TAO_ORB_Core_instance ()->orb ()->object_to_string (this->sep_b_.in ())));
if (TAO_debug_level > 0)
{
CORBA::String_var ep = TAO_ORB_Core_instance ()->orb ()->object_to_string (this->sep_b_.in ());
ORBSVCS_DEBUG ((LM_DEBUG,
"\n(%P|%t)stream_endpoint_b_ = <%C>",
ep.in ()));
}

// Define ourselves as the related_streamctrl property of the sep.
CORBA::Any streamctrl_any;
streamctrl_any <<= this->streamctrl_.in ();
Expand Down
14 changes: 6 additions & 8 deletions TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp
@@ -1,4 +1,3 @@

//=============================================================================
/**
* @file Endpoint_Strategy.cpp
Expand All @@ -7,7 +6,6 @@
*/
//=============================================================================


#include "orbsvcs/Log_Macros.h"
#include "orbsvcs/Log_Macros.h"
#include "orbsvcs/AV/Endpoint_Strategy.h"
Expand All @@ -17,8 +15,6 @@

#include "ace/Process_Semaphore.h"



TAO_BEGIN_VERSIONED_NAMESPACE_DECL

// ----------------------------------------------------------------------
Expand All @@ -33,7 +29,6 @@ TAO_AV_Endpoint_Strategy::TAO_AV_Endpoint_Strategy (void)
// Destructor.
TAO_AV_Endpoint_Strategy::~TAO_AV_Endpoint_Strategy (void)
{

}

// The base class defines the "failure" case, so that unless the
Expand Down Expand Up @@ -62,7 +57,6 @@ TAO_AV_Endpoint_Strategy::create_B (AVStreams::StreamEndPoint_B_ptr & /* stream_
-1);
}


// ----------------------------------------------------------------------
// TAO_AV_Endpoint_Process_Strategy
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -339,8 +333,12 @@ TAO_AV_Endpoint_Process_Strategy_B::create_B (AVStreams::StreamEndPoint_B_ptr &s
"(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
-1);

if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Process_Strategy_B::create_B ()\n: stream_endpoint is:%s\n",
TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_.in())));
if (TAO_debug_level > 0)
{
CORBA::String_var ep = TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_.in());
ORBSVCS_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Process_Strategy_B::create_B ()\n: stream_endpoint is: <%C>\n",
ep.in ()));
}
stream_endpoint = AVStreams::StreamEndPoint_B::_duplicate ( this->stream_endpoint_b_.in() );
vdev = AVStreams::VDev::_duplicate( this->vdev_.in() );
}
Expand Down
4 changes: 2 additions & 2 deletions TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp
Expand Up @@ -46,7 +46,7 @@ TAO_EC_Event_Channel_Base (const TAO_EC_Event_Channel_Attributes& attr,
TAO_EC_Event_Channel_Base::~TAO_EC_Event_Channel_Base (void)
{
// Destroy Strategies in the reverse order of creation, they
// refere to each other during destruction and thus need to be
// reference to each other during destruction and thus need to be
// cleaned up properly.
this->factory_->destroy_supplier_control (this->supplier_control_);
this->supplier_control_ = 0;
Expand Down Expand Up @@ -76,7 +76,7 @@ TAO_EC_Event_Channel_Base::~TAO_EC_Event_Channel_Base (void)
this->factory_->destroy_dispatching (this->dispatching_);
this->dispatching_ = 0;

this->factory (0, 0);
this->factory (0, this->own_factory_);
}

void
Expand Down
2 changes: 1 addition & 1 deletion TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp
Expand Up @@ -1450,7 +1450,7 @@ Admin_Client::union_test (void)
CORBA::Any_var label = tc->member_label (i);

TAO_InputCDR cdr (static_cast<ACE_Message_Block *> (0));
CORBA::ULong val;
CORBA::ULong val = 0;

TAO::Any_Impl *impl = label->impl ();
TAO_OutputCDR out;
Expand Down

0 comments on commit 07ca9f7

Please sign in to comment.