qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scan-ad...@coverity.com
Subject New Defects reported by Coverity Scan for Apache-Qpid
Date Sat, 15 Jun 2013 13:42:48 GMT

Hi,

Please find the latest report on new defect(s) introduced to Apache-Qpid found with Coverity
Scan

Defect(s) Reported-by: Coverity Scan
Showing 7 of 64 defects
	
** CID 1033541: Unused pointer value (UNUSED_VALUE)
/bindings/qpid/perl/perlPERL_wrap.cxx: 4956

** CID 1033540: Uninitialized scalar field (UNINIT_CTOR)
/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 163

** CID 1033539: Uninitialized pointer field (UNINIT_CTOR)
/qpidbuilds/trunk/qpid/cpp/src/qpidd.h: 55

** CID 1033538: Uninitialized scalar field (UNINIT_CTOR)
/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/SslTransport.cpp: 55

** CID 1033537: Uninitialized pointer field (UNINIT_CTOR)
/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 42

** CID 1033536: Uninitialized pointer field (UNINIT_CTOR)
/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 37

** CID 1033535: Uninitialized pointer field (UNINIT_CTOR)
/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 47


________________________________________________________________________
CID 1033541: Unused pointer value (UNUSED_VALUE)

/bindings/qpid/perl/perlPERL_wrap.cxx: 4956 ( returned_pointer)
   4953          }
   4954        }
   4955        {
>>> CID 1033541: Unused pointer value (UNUSED_VALUE)
>>> Pointer "sp" returned by "Perl_stack_grow((PerlInterpreter *)pthread_getspecific(*Perl_Gthr_key_ptr(NULL)),
sp, sp, 1)" is never used.
   4956          if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_FromCharPtrAndSize((&result)->ptr,
(&result)->len); argvi++  ;
   4957        }
   4958        
   4959        XSRETURN(argvi);
   4960      fail:
  
________________________________________________________________________
CID 1033540: Uninitialized scalar field (UNINIT_CTOR)

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 166 ( member_decl)
   163        }
   164    
   165        // Computed values
>>> Class member declaration for "totalPubs".
   166        size_t totalPubs;
   167        size_t totalSubs;
   168        size_t transfers;
   169        size_t subQuota;
   170    
  

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 163 ( uninit_member)
   160                ("pub-tx", optValue(txPub, "N"), "if non-zero, the transaction batch
size for publishing")
   161                ("async-commit", optValue(commitAsync, "yes|no"), "Don't wait for completion
of commit")
   162                ("sub-tx", optValue(txSub, "N"), "if non-zero, the transaction batch
size for consuming");
>>> Non-static class member "totalPubs" is not initialized in this constructor nor
in any functions that it calls.
   163        }
   164    
   165        // Computed values
   166        size_t totalPubs;
   167        size_t totalSubs;
  

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 167 ( member_decl)
   164    
   165        // Computed values
   166        size_t totalPubs;
>>> Class member declaration for "totalSubs".
   167        size_t totalSubs;
   168        size_t transfers;
   169        size_t subQuota;
   170    
   171        void parse(int argc, char** argv) {
  

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 163 ( uninit_member)
   160                ("pub-tx", optValue(txPub, "N"), "if non-zero, the transaction batch
size for publishing")
   161                ("async-commit", optValue(commitAsync, "yes|no"), "Don't wait for completion
of commit")
   162                ("sub-tx", optValue(txSub, "N"), "if non-zero, the transaction batch
size for consuming");
>>> Non-static class member "totalSubs" is not initialized in this constructor nor
in any functions that it calls.
   163        }
   164    
   165        // Computed values
   166        size_t totalPubs;
   167        size_t totalSubs;
  

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 168 ( member_decl)
   165        // Computed values
   166        size_t totalPubs;
   167        size_t totalSubs;
>>> Class member declaration for "transfers".
   168        size_t transfers;
   169        size_t subQuota;
   170    
   171        void parse(int argc, char** argv) {
   172            TestOptions::parse(argc, argv);
  

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 163 ( uninit_member)
   160                ("pub-tx", optValue(txPub, "N"), "if non-zero, the transaction batch
size for publishing")
   161                ("async-commit", optValue(commitAsync, "yes|no"), "Don't wait for completion
of commit")
   162                ("sub-tx", optValue(txSub, "N"), "if non-zero, the transaction batch
size for consuming");
>>> Non-static class member "transfers" is not initialized in this constructor nor
in any functions that it calls.
   163        }
   164    
   165        // Computed values
   166        size_t totalPubs;
   167        size_t totalSubs;
  

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 169 ( member_decl)
   166        size_t totalPubs;
   167        size_t totalSubs;
   168        size_t transfers;
>>> Class member declaration for "subQuota".
   169        size_t subQuota;
   170    
   171        void parse(int argc, char** argv) {
   172            TestOptions::parse(argc, argv);
   173            switch (mode) {
  

/qpidbuilds/trunk/qpid/cpp/src/tests/qpid-perftest.cpp: 163 ( uninit_member)
   160                ("pub-tx", optValue(txPub, "N"), "if non-zero, the transaction batch
size for publishing")
   161                ("async-commit", optValue(commitAsync, "yes|no"), "Don't wait for completion
of commit")
   162                ("sub-tx", optValue(txSub, "N"), "if non-zero, the transaction batch
size for consuming");
>>> CID 1033540: Uninitialized scalar field (UNINIT_CTOR)
>>> Non-static class member "subQuota" is not initialized in this constructor nor
in any functions that it calls.
   163        }
   164    
   165        // Computed values
   166        size_t totalPubs;
   167        size_t totalSubs;
  
________________________________________________________________________
CID 1033539: Uninitialized pointer field (UNINIT_CTOR)

/qpidbuilds/trunk/qpid/cpp/src/qpidd.h: 51 ( member_decl)
   48    // these derived structs from its constructor.
   49    struct QpiddOptions;
   50    struct QpiddOptionsPrivate {
>>> Class member declaration for "options".
   51        QpiddOptions *options;
   52        QpiddOptionsPrivate(QpiddOptions *parent) : options(parent) {}
   53        virtual ~QpiddOptionsPrivate() {}
   54    protected:
   55        QpiddOptionsPrivate() {}
  

/qpidbuilds/trunk/qpid/cpp/src/qpidd.h: 55 ( uninit_member)
   52        QpiddOptionsPrivate(QpiddOptions *parent) : options(parent) {}
   53        virtual ~QpiddOptionsPrivate() {}
   54    protected:
>>> CID 1033539: Uninitialized pointer field (UNINIT_CTOR)
>>> Non-static class member "options" is not initialized in this constructor nor
in any functions that it calls.
   55        QpiddOptionsPrivate() {}
   56    };
   57    
   58    struct QpiddOptions : public qpid::Options {
   59        qpid::CommonOptions common;
  
________________________________________________________________________
CID 1033538: Uninitialized scalar field (UNINIT_CTOR)

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/SslTransport.h: 60 ( member_decl)
   57        qpid::sys::AsynchConnector* connector;
   58        qpid::sys::AsynchIO* aio;
   59        boost::shared_ptr<qpid::sys::Poller> poller;
>>> Class member declaration for "closed".
   60        bool closed;
   61        std::string id;
   62    
   63        void connected(const qpid::sys::Socket&);
   64        void failed(const std::string& msg);
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/SslTransport.cpp: 55 ( uninit_member)
   52    }
   53    
   54    
>>> CID 1033538: Uninitialized scalar field (UNINIT_CTOR)
>>> Non-static class member "closed" is not initialized in this constructor nor in
any functions that it calls.
   55    SslTransport::SslTransport(TransportContext& c, boost::shared_ptr<Poller>
p) : context(c), connector(0), aio(0), poller(p) {}
   56    
   57    void SslTransport::connect(const std::string& host, const std::string& port)
   58    {
   59        assert(!connector);
  
________________________________________________________________________
CID 1033537: Uninitialized pointer field (UNINIT_CTOR)

/qpidbuilds/trunk/qpid/cpp/src/qpid/amqp/CharSequence.h: 38 ( member_decl)
   35     */
   36    struct CharSequence
   37    {
>>> Class member declaration for "data".
   38        const char* data;
   39        size_t size;
   40    
   41        QPID_COMMON_EXTERN operator bool() const;
   42        QPID_COMMON_EXTERN std::string str() const;
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 42 ( uninit_member)
   39    EncodedMessage::EncodedMessage() : size(0), data(0)
   40    {
   41        init();
>>> Non-static class member field "bareMessage.data" is not initialized in this constructor
nor in any functions that it calls.
   42    }
   43    
   44    EncodedMessage::EncodedMessage(const EncodedMessage& other) : size(other.size),
data(size ? new char[size] : 0)
   45    {
   46        init();
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/amqp/CharSequence.h: 39 ( member_decl)
   36    struct CharSequence
   37    {
   38        const char* data;
>>> Class member declaration for "size".
   39        size_t size;
   40    
   41        QPID_COMMON_EXTERN operator bool() const;
   42        QPID_COMMON_EXTERN std::string str() const;
   43        QPID_COMMON_EXTERN void init();
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 42 ( uninit_member)
   39    EncodedMessage::EncodedMessage() : size(0), data(0)
   40    {
   41        init();
>>> CID 1033537: Uninitialized pointer field (UNINIT_CTOR)
>>> Non-static class member field "bareMessage.size" is not initialized in this constructor
nor in any functions that it calls.
   42    }
   43    
   44    EncodedMessage::EncodedMessage(const EncodedMessage& other) : size(other.size),
data(size ? new char[size] : 0)
   45    {
   46        init();
  
________________________________________________________________________
CID 1033536: Uninitialized pointer field (UNINIT_CTOR)

/qpidbuilds/trunk/qpid/cpp/src/qpid/amqp/CharSequence.h: 38 ( member_decl)
   35     */
   36    struct CharSequence
   37    {
>>> Class member declaration for "data".
   38        const char* data;
   39        size_t size;
   40    
   41        QPID_COMMON_EXTERN operator bool() const;
   42        QPID_COMMON_EXTERN std::string str() const;
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 37 ( uninit_member)
   34    EncodedMessage::EncodedMessage(size_t s) : size(s), data(size ? new char[size] :
0)
   35    {
   36        init();
>>> Non-static class member field "bareMessage.data" is not initialized in this constructor
nor in any functions that it calls.
   37    }
   38    
   39    EncodedMessage::EncodedMessage() : size(0), data(0)
   40    {
   41        init();
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/amqp/CharSequence.h: 39 ( member_decl)
   36    struct CharSequence
   37    {
   38        const char* data;
>>> Class member declaration for "size".
   39        size_t size;
   40    
   41        QPID_COMMON_EXTERN operator bool() const;
   42        QPID_COMMON_EXTERN std::string str() const;
   43        QPID_COMMON_EXTERN void init();
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 37 ( uninit_member)
   34    EncodedMessage::EncodedMessage(size_t s) : size(s), data(size ? new char[size] :
0)
   35    {
   36        init();
>>> CID 1033536: Uninitialized pointer field (UNINIT_CTOR)
>>> Non-static class member field "bareMessage.size" is not initialized in this constructor
nor in any functions that it calls.
   37    }
   38    
   39    EncodedMessage::EncodedMessage() : size(0), data(0)
   40    {
   41        init();
  
________________________________________________________________________
CID 1033535: Uninitialized pointer field (UNINIT_CTOR)

/qpidbuilds/trunk/qpid/cpp/src/qpid/amqp/CharSequence.h: 38 ( member_decl)
   35     */
   36    struct CharSequence
   37    {
>>> Class member declaration for "data".
   38        const char* data;
   39        size_t size;
   40    
   41        QPID_COMMON_EXTERN operator bool() const;
   42        QPID_COMMON_EXTERN std::string str() const;
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 47 ( uninit_member)
   44    EncodedMessage::EncodedMessage(const EncodedMessage& other) : size(other.size),
data(size ? new char[size] : 0)
   45    {
   46        init();
>>> Non-static class member field "bareMessage.data" is not initialized in this constructor
nor in any functions that it calls.
   47    }
   48    
   49    void EncodedMessage::init()
   50    {
   51        //init all CharSequence members
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/amqp/CharSequence.h: 39 ( member_decl)
   36    struct CharSequence
   37    {
   38        const char* data;
>>> Class member declaration for "size".
   39        size_t size;
   40    
   41        QPID_COMMON_EXTERN operator bool() const;
   42        QPID_COMMON_EXTERN std::string str() const;
   43        QPID_COMMON_EXTERN void init();
  

/qpidbuilds/trunk/qpid/cpp/src/qpid/messaging/amqp/EncodedMessage.cpp: 47 ( uninit_member)
   44    EncodedMessage::EncodedMessage(const EncodedMessage& other) : size(other.size),
data(size ? new char[size] : 0)
   45    {
   46        init();
>>> CID 1033535: Uninitialized pointer field (UNINIT_CTOR)
>>> Non-static class member field "bareMessage.size" is not initialized in this constructor
nor in any functions that it calls.
   47    }
   48    
   49    void EncodedMessage::init()
   50    {
   51        //init all CharSequence members
  
________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com

To unsubscribe from the email notification for new defects, http://scan5.coverity.com/cgi-bin/unsubscribe.py

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message