diff options
author | Johnny Willemsen <jwillemsen@users.noreply.github.com> | 2016-09-14 21:13:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-14 21:13:20 +0200 |
commit | 7dfbcfae901c1431702549a81cc47d1fd43a61bb (patch) | |
tree | a1d4534ebaec8558444aceee44e646dd7ea32982 | |
parent | 07ca9f71b2596c2186f6a3da8fb4751f1d1b0d3d (diff) | |
parent | 21737cc4d46d96e3b2c527b60277caf1bf4c3749 (diff) | |
download | ATCD-7dfbcfae901c1431702549a81cc47d1fd43a61bb.tar.gz |
Merge pull request #294 from jwillemsen/master
Fixed Coverity reported issues
-rw-r--r-- | ACE/ACEXML/common/Mem_Map_Stream.cpp | 8 | ||||
-rw-r--r-- | ACE/ACEXML/examples/SAXPrint/Print_Handler.cpp | 22 | ||||
-rw-r--r-- | ACE/ACEXML/examples/SAXPrint/Print_Handler.h | 2 | ||||
-rw-r--r-- | ACE/ACEXML/examples/SAXPrint/main.cpp | 24 | ||||
-rw-r--r-- | ACE/ace/Naming_Context.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/HTTP_Client.cpp | 1 | ||||
-rw-r--r-- | TAO/tao/HTTP_Handler.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp | 34 | ||||
-rw-r--r-- | TAO/tao/Messaging/AMH_Response_Handler.cpp | 1 |
9 files changed, 34 insertions, 66 deletions
diff --git a/ACE/ACEXML/common/Mem_Map_Stream.cpp b/ACE/ACEXML/common/Mem_Map_Stream.cpp index df21523d97a..66a065055ab 100644 --- a/ACE/ACEXML/common/Mem_Map_Stream.cpp +++ b/ACE/ACEXML/common/Mem_Map_Stream.cpp @@ -4,12 +4,12 @@ #include "ACEXML/common/Mem_Map_Stream.h" - - ACEXML_Mem_Map_Stream::ACEXML_Mem_Map_Stream (void) - : svc_handler_ (0) + : svc_handler_ (0), + recv_pos_ (0), + get_pos_ (0), + end_of_mapping_plus1_ (0) { - } ACE_SOCK_Stream & diff --git a/ACE/ACEXML/examples/SAXPrint/Print_Handler.cpp b/ACE/ACEXML/examples/SAXPrint/Print_Handler.cpp index 73a295fcdc8..8b6ccdc374d 100644 --- a/ACE/ACEXML/examples/SAXPrint/Print_Handler.cpp +++ b/ACE/ACEXML/examples/SAXPrint/Print_Handler.cpp @@ -5,9 +5,9 @@ #include "ace/Log_Msg.h" ACEXML_Print_Handler::ACEXML_Print_Handler (ACEXML_Char* fileName) - : fileName_(ACE::strnew (fileName)) + : fileName_(ACE::strnew (fileName)), + locator_ (0) { - } ACEXML_Print_Handler::~ACEXML_Print_Handler (void) @@ -20,8 +20,6 @@ ACEXML_Print_Handler::characters (const ACEXML_Char *cdata, size_t start, size_t length) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event characters () ** start: %u end: %u ***************\n%s\n- End event characters () ---------------\n"), start, length, cdata)); @@ -30,8 +28,6 @@ ACEXML_Print_Handler::characters (const ACEXML_Char *cdata, void ACEXML_Print_Handler::endDocument (void) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event endDocument () ***************\n"))); } @@ -41,8 +37,6 @@ ACEXML_Print_Handler::endElement (const ACEXML_Char *uri, const ACEXML_Char *name, const ACEXML_Char *qName) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event endElement (%s, %s, %s) ***************\n"), uri, name, qName)); @@ -51,8 +45,6 @@ ACEXML_Print_Handler::endElement (const ACEXML_Char *uri, void ACEXML_Print_Handler::endPrefixMapping (const ACEXML_Char *prefix) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event endPrefixMapping (%s) ***************\n"), prefix)); @@ -71,8 +63,6 @@ void ACEXML_Print_Handler::processingInstruction (const ACEXML_Char *target, const ACEXML_Char *data) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event processingInstruction (%s, %s) ***************\n"), target, data)); @@ -81,7 +71,6 @@ ACEXML_Print_Handler::processingInstruction (const ACEXML_Char *target, void ACEXML_Print_Handler::setDocumentLocator (ACEXML_Locator * locator) { - this->locator_ = locator; // ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event setDocumentLocator () ***************\n"))); } @@ -89,8 +78,6 @@ ACEXML_Print_Handler::setDocumentLocator (ACEXML_Locator * locator) void ACEXML_Print_Handler::skippedEntity (const ACEXML_Char *name) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event skippedEntity (%s) ***************\n"), name)); @@ -99,8 +86,6 @@ ACEXML_Print_Handler::skippedEntity (const ACEXML_Char *name) void ACEXML_Print_Handler::startDocument (void) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event startDocument () ***************\n"))); } @@ -111,8 +96,6 @@ ACEXML_Print_Handler::startElement (const ACEXML_Char *uri, const ACEXML_Char *qName, ACEXML_Attributes *alist) { - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("* Event startElement (%s, %s, %s) ***************\n"), uri, name, qName)); @@ -218,7 +201,6 @@ ACEXML_Print_Handler::fatalError (ACEXML_SAXParseException& ex) this->locator_->getLineNumber(), this->locator_->getColumnNumber())); ex.print(); - } void diff --git a/ACE/ACEXML/examples/SAXPrint/Print_Handler.h b/ACE/ACEXML/examples/SAXPrint/Print_Handler.h index b383fb3cbef..da8381f50de 100644 --- a/ACE/ACEXML/examples/SAXPrint/Print_Handler.h +++ b/ACE/ACEXML/examples/SAXPrint/Print_Handler.h @@ -142,10 +142,8 @@ public: */ virtual void warning (ACEXML_SAXParseException &exception); private: - ACEXML_Char* fileName_; ACEXML_Locator* locator_; - }; #endif /* ACEXML_PRINT_HANDLER_H */ diff --git a/ACE/ACEXML/examples/SAXPrint/main.cpp b/ACE/ACEXML/examples/SAXPrint/main.cpp index 833705640b4..ea61c506050 100644 --- a/ACE/ACEXML/examples/SAXPrint/main.cpp +++ b/ACE/ACEXML/examples/SAXPrint/main.cpp @@ -173,30 +173,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_ERROR, ACE_TEXT ("Exception occurred. Exiting...\n"))); return 1; } -// ACEXML_TRY_EX (THIRD) -// { -// parser.parse (&input ACEXML_ENV_ARG_PARAMETER); -// ACEXML_TRY_CHECK_EX (THIRD); -// } -// ACEXML_CATCH (ACEXML_SAXException, ex) -// { -// ex.print(); -// ACE_DEBUG ((LM_ERROR, ACE_TEXT ("Exception occurred. Exiting...\n"))); -// return 1; -// } -// ACEXML_ENDTRY; -// ACEXML_TRY_EX (FOURTH) -// { -// parser.parse (&input ACEXML_ENV_ARG_PARAMETER); -// ACEXML_TRY_CHECK_EX (FOURTH); -// } -// ACEXML_CATCH (ACEXML_SAXException, ex) -// { -// ex.print(); -// ACE_DEBUG ((LM_ERROR, ACE_TEXT ("Exception occurred. Exiting...\n"))); -// return 1; -// } -// ACEXML_ENDTRY; return 0; } diff --git a/ACE/ace/Naming_Context.cpp b/ACE/ace/Naming_Context.cpp index 8d0ba1d2335..ddfad7f9653 100644 --- a/ACE/ace/Naming_Context.cpp +++ b/ACE/ace/Naming_Context.cpp @@ -140,7 +140,8 @@ ACE_Naming_Context::close (void) ACE_Naming_Context::ACE_Naming_Context (void) : name_options_ (0), name_space_ (0), - netnameserver_host_ (0) + netnameserver_host_ (0), + netnameserver_port_ (0) { ACE_TRACE ("ACE_Naming_Context::ACE_Naming_Context"); diff --git a/TAO/tao/HTTP_Client.cpp b/TAO/tao/HTTP_Client.cpp index 64f7f792068..f4ddaa6678d 100644 --- a/TAO/tao/HTTP_Client.cpp +++ b/TAO/tao/HTTP_Client.cpp @@ -10,6 +10,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_HTTP_Client::TAO_HTTP_Client (void) + : filename_ (0) { } diff --git a/TAO/tao/HTTP_Handler.cpp b/TAO/tao/HTTP_Handler.cpp index 8468a6d9ddf..c645b03007a 100644 --- a/TAO/tao/HTTP_Handler.cpp +++ b/TAO/tao/HTTP_Handler.cpp @@ -9,7 +9,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_HTTP_Handler::TAO_HTTP_Handler (void) +TAO_HTTP_Handler::TAO_HTTP_Handler (void) : + mb_ (0), + filename_ (0), + bytecount_ (0) { } diff --git a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp index 15c865ed9ef..5f15990b92d 100644 --- a/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp +++ b/TAO/tao/IORManipulation/IORManip_IIOP_Filter.cpp @@ -193,25 +193,31 @@ TAO_IORManip_IIOP_Filter::get_endpoints (TAO_Profile* profile, const TAO_Tagged_Components& comps = profile->tagged_components (); IOP::TaggedComponent tagged_component; tagged_component.tag = TAO_TAG_ENDPOINTS; - comps.get_component (tagged_component); - // Prepare the CDR for endpoint extraction - const CORBA::Octet *buf = - tagged_component.component_data.get_buffer (); + if (comps.get_component (tagged_component)) + { + // Prepare the CDR for endpoint extraction + const CORBA::Octet *buf = + tagged_component.component_data.get_buffer (); - TAO_InputCDR in_cdr (reinterpret_cast<const char*> (buf), - tagged_component.component_data.length ()); + TAO_InputCDR in_cdr (reinterpret_cast<const char*> (buf), + tagged_component.component_data.length ()); - // Extract the Byte Order. - CORBA::Boolean byte_order; - if (!(in_cdr >> ACE_InputCDR::to_boolean (byte_order))) - return 0; + // Extract the Byte Order. + CORBA::Boolean byte_order; + if (!(in_cdr >> ACE_InputCDR::to_boolean (byte_order))) + return 0; - in_cdr.reset_byte_order (static_cast<int> (byte_order)); + in_cdr.reset_byte_order (static_cast<int> (byte_order)); - // Extract endpoints sequence. - if (!(in_cdr >> endpoints)) - return 0; + // Extract endpoints sequence. + if (!(in_cdr >> endpoints)) + return 0; + } + else + { + return 0; + } return 1; } diff --git a/TAO/tao/Messaging/AMH_Response_Handler.cpp b/TAO/tao/Messaging/AMH_Response_Handler.cpp index f31f6d6c3a2..c251bcf0df5 100644 --- a/TAO/tao/Messaging/AMH_Response_Handler.cpp +++ b/TAO/tao/Messaging/AMH_Response_Handler.cpp @@ -20,6 +20,7 @@ TAO_AMH_Response_Handler::TAO_AMH_Response_Handler () : reply_status_ (GIOP::NO_EXCEPTION) , mesg_base_ (0) , request_id_ (0) + , response_expected_ (0) , transport_ (0) , orb_core_ (0) , argument_flag_ (1) |