]> git.saurik.com Git - apt.git/commitdiff
fix: Member variable 'X' is not initialized in the constructor.
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 26 Sep 2014 20:16:26 +0000 (22:16 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Fri, 26 Sep 2014 22:11:11 +0000 (00:11 +0200)
Reported-By: cppcheck
Git-Dch: Ignore

13 files changed:
apt-pkg/acquire.cc
apt-pkg/acquire.h
apt-pkg/cdrom.cc
apt-pkg/contrib/fileutl.cc
apt-pkg/install-progress.cc
apt-pkg/install-progress.h
apt-pkg/metaindex.h
apt-pkg/pkgcache.cc
apt-pkg/pkgcachegen.h
apt-pkg/tagfile.h
ftparchive/sources.h
methods/ftp.cc
methods/https.h

index 8467dab5b6086e1c2fe018debe36ab0d748dcd27..f0a88a53842c83e4ecf0fed5ea577a145e860587 100644 (file)
@@ -581,27 +581,18 @@ pkgAcquire::UriIterator pkgAcquire::UriEnd()
 // Acquire::MethodConfig::MethodConfig - Constructor                   /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-pkgAcquire::MethodConfig::MethodConfig()
+pkgAcquire::MethodConfig::MethodConfig() : d(NULL), Next(0), SingleInstance(false),
+   Pipeline(false), SendConfig(false), LocalOnly(false), NeedsCleanup(false),
+   Removable(false)
 {
-   SingleInstance = false;
-   Pipeline = false;
-   SendConfig = false;
-   LocalOnly = false;
-   Removable = false;
-   Next = 0;
 }
                                                                        /*}}}*/
 // Queue::Queue - Constructor                                          /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-pkgAcquire::Queue::Queue(string Name,pkgAcquire *Owner) : Name(Name), 
-            Owner(Owner)
+pkgAcquire::Queue::Queue(string Name,pkgAcquire *Owner) : d(NULL), Next(0),
+   Name(Name), Items(0), Workers(0), Owner(Owner), PipeDepth(0), MaxPipeDepth(1)
 {
-   Items = 0;
-   Next = 0;
-   Workers = 0;
-   MaxPipeDepth = 1;
-   PipeDepth = 0;
 }
                                                                        /*}}}*/
 // Queue::~Queue - Destructor                                          /*{{{*/
@@ -805,7 +796,7 @@ void pkgAcquire::Queue::Bump()
 // AcquireStatus::pkgAcquireStatus - Constructor                       /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-pkgAcquireStatus::pkgAcquireStatus() : d(NULL), Update(true), MorePulses(false)
+pkgAcquireStatus::pkgAcquireStatus() : d(NULL), Percent(0), Update(true), MorePulses(false)
 {
    Start();
 }
index 0113021b21dce95c1a4cec534a61732c2e75d5c8..a92ecc24c37e899b537fa8b727753aa73600b7d7 100644 (file)
@@ -585,7 +585,7 @@ class pkgAcquire::UriIterator
     *
     *  \param Q The queue over which this UriIterator should iterate.
     */
-   UriIterator(pkgAcquire::Queue *Q) : CurQ(Q), CurItem(0)
+   UriIterator(pkgAcquire::Queue *Q) : d(NULL), CurQ(Q), CurItem(0)
    {
       while (CurItem == 0 && CurQ != 0)
       {
index a5ad6a9ff130225d3fffd2caeb5f8405a96046a2..b97f7b0365d527d880ace99145ea54314f4b02f3 100644 (file)
@@ -913,10 +913,14 @@ bool pkgCdrom::Add(pkgCdromStatus *log)                                   /*{{{*/
    return true;
 }
                                                                        /*}}}*/
-pkgUdevCdromDevices::pkgUdevCdromDevices()                                     /*{{{*/
-   : libudev_handle(NULL)
+pkgUdevCdromDevices::pkgUdevCdromDevices()                             /*{{{*/
+: libudev_handle(NULL), udev_new(NULL), udev_enumerate_add_match_property(NULL),
+   udev_enumerate_scan_devices(NULL), udev_enumerate_get_list_entry(NULL),
+   udev_device_new_from_syspath(NULL), udev_enumerate_get_udev(NULL),
+   udev_list_entry_get_name(NULL), udev_device_get_devnode(NULL),
+   udev_enumerate_new(NULL), udev_list_entry_get_next(NULL),
+   udev_device_get_property_value(NULL), udev_enumerate_add_match_sysattr(NULL)
 {
-
 }
                                                                        /*}}}*/
 
index e81f32a522755407938dc95f9c82c4cae8e80030..9e77020636f4ab5987370d68529800ff7820526e 100644 (file)
@@ -896,7 +896,7 @@ class FileFdPrivate {                                                       /*{{{*/
           bool eof;
           bool compressing;
 
-          LZMAFILE() : file(NULL), eof(false), compressing(false) {}
+          LZMAFILE() : file(NULL), eof(false), compressing(false) { buffer[0] = '\0'; }
           ~LZMAFILE() {
              if (compressing == true)
              {
index cf6c859125600c250f6363b7f8e1013cabd75aa0..0d180d59b52caa9b98de392611ff0c3e367064e8 100644 (file)
@@ -21,6 +21,8 @@
 namespace APT {
 namespace Progress {
 
+PackageManager::PackageManager() : d(NULL), percentage(0.0), last_reported_progress(-1) {};
+PackageManager::~PackageManager() {};
 
 /* Return a APT::Progress::PackageManager based on the global
  * apt configuration (i.e. APT::Status-Fd and APT::Status-deb822-Fd)
index 5d1a20e9bb814c765fa92b91908714e5472befe6..912700e8d8c580ceeb5d77f80a5a419e6870d918 100644 (file)
@@ -26,9 +26,8 @@ namespace Progress {
     int last_reported_progress;
 
  public:
-    PackageManager()
-       : percentage(0.0), last_reported_progress(-1) {};
-    virtual ~PackageManager() {};
+    PackageManager();
+    virtual ~PackageManager();
 
     /* Global Start/Stop */
     virtual void Start(int /*child_pty*/=-1) {};
index ffabaadbfcee359b106ab3f6c7fed6e5e7044a5a..7c4d0c1aa1a6e0f77f42a97e95ae8774a188c0e6 100644 (file)
@@ -53,7 +53,7 @@ class metaIndex
 
    metaIndex(std::string const &URI, std::string const &Dist, 
              char const * const Type) 
-      : Indexes(NULL), Type(Type), URI(URI), Dist(Dist)
+      : Indexes(NULL), Type(Type), URI(URI), Dist(Dist), Trusted(false)
    {
       /* nothing */
    }
index 4ab9e2a4b4dbe335265c2536e5fe9ede8ced1a90..572685ba5f14ec909683cd7c8c10b3c696e82cc2 100644 (file)
@@ -84,6 +84,7 @@ pkgCache::Header::Header()
    FileList = 0;
    VerSysName = 0;
    Architecture = 0;
+   Architectures = 0;
    HashTableSize = _config->FindI("APT::Cache-HashTableSize", 10 * 1048);
    memset(Pools,0,sizeof(Pools));
 
index 84777b912e5c66b992c3f1e54989e64b312b4732..e1d22b88f95245d4c0db69b32f5d2c61bd911165 100644 (file)
@@ -193,7 +193,7 @@ class pkgCacheGenerator::ListParser
    virtual bool CollectFileProvides(pkgCache &/*Cache*/,
                                    pkgCache::VerIterator &/*Ver*/) {return true;};
 
-   ListParser() : FoundFileDeps(false) {};
+   ListParser() : Owner(NULL), OldDepLast(NULL), FoundFileDeps(false) {};
    virtual ~ListParser() {};
 };
                                                                        /*}}}*/
index 3e84d8fd4630c0dec15fa389532d1421c860931c..39ec94d86ebb20bd521538864036d2443d2b0908 100644 (file)
@@ -43,7 +43,7 @@ class pkgTagSection
       unsigned int StartValue;
       unsigned int NextInBucket;
 
-      TagData(unsigned int const StartTag) : StartTag(StartTag), NextInBucket(0) {}
+      TagData(unsigned int const StartTag) : StartTag(StartTag), EndTag(0), StartValue(0), NextInBucket(0) {}
    };
    std::vector<TagData> Tags;
    unsigned int LookupTable[0x100];
index 91e0b137631479ef486ea8a1621c9f21945efdfc..9ada1572859a120e77a1517d356fa08765bf914a 100644 (file)
@@ -17,7 +17,7 @@ class DscExtract
    bool TakeDsc(const void *Data, unsigned long Size);
    bool Read(std::string FileName);
    
-   DscExtract() : Data(0), Length(0) {
+   DscExtract() : Data(0), Length(0), IsClearSigned(false) {
      Data = new char[maxSize];
    };
    ~DscExtract() { 
index a658b5657e552b3557c941d3f306e6edc0123c35..ac76295f02ef1342e00dc7a0e9aac52fa38a77a5 100644 (file)
@@ -75,9 +75,10 @@ time_t FtpMethod::FailTime = 0;
 // FTPConn::FTPConn - Constructor                                      /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-FTPConn::FTPConn(URI Srv) : Len(0), ServerFd(-1), DataFd(-1), 
+FTPConn::FTPConn(URI Srv) : Len(0), ServerFd(-1), DataFd(-1),
                             DataListenFd(-1), ServerName(Srv),
-                           ForceExtended(false), TryPassive(true)
+                           ForceExtended(false), TryPassive(true),
+                           PeerAddrLen(0), ServerAddrLen(0)
 {
    Debug = _config->FindB("Debug::Acquire::Ftp",false);
    PasvAddr = 0;
index faac8a3cdae8c247b103e44baaec5146d5d02fe3..45d1f7f63a94858731e3659fa0742e8fc0ec3622 100644 (file)
@@ -69,10 +69,9 @@ class HttpsMethod : public pkgAcqMethod
 
    public:
    FileFd *File;
-      
-   HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig), File(NULL)
+
+   HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig), Server(NULL), File(NULL)
    {
-      File = 0;
       curl = curl_easy_init();
    };