]> git.saurik.com Git - apt.git/commitdiff
fix some cppcheck: (warning) Member variable is not initialized in the constructor.
authorDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 11 Aug 2011 17:20:53 +0000 (19:20 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Thu, 11 Aug 2011 17:20:53 +0000 (19:20 +0200)
apt-pkg/aptconfiguration.h
apt-pkg/indexfile.cc
apt-pkg/tagfile.h
cmdline/apt-get.cc

index 1f0399dd292ca75ffbe9b389bbde6ab6593ae5e5..e098d0fd6f4ea9d3921cd1cb0a77e9e128e9f5d8 100644 (file)
@@ -13,6 +13,7 @@
 // Include Files                                                       /*{{{*/
 #include <string>
 #include <vector>
+#include <limits>
                                                                        /*}}}*/
 namespace APT {
 class Configuration {                                                  /*{{{*/
@@ -94,7 +95,7 @@ public:                                                                       /*{{{*/
                Compressor(char const *name, char const *extension, char const *binary,
                           char const *compressArg, char const *uncompressArg,
                           unsigned short const cost);
-               Compressor() {};
+               Compressor() : Cost(std::numeric_limits<unsigned short>::max()) {};
        };
 
        /** \brief Return a vector of Compressors supported for data.tar's
index 37be87055367d8eb02ba3135f0315976a4de1df3..f18ddbfaae1556ae8688b800b447eea14ff3503a 100644 (file)
@@ -27,7 +27,8 @@ unsigned long pkgIndexFile::Type::GlobalListLen = 0;
 pkgIndexFile::Type::Type()
 {
    ItmList[GlobalListLen] = this;
-   GlobalListLen++;   
+   GlobalListLen++;
+   Label = NULL;
 }
                                                                        /*}}}*/
 // Type::GetType - Locate the type by name                             /*{{{*/
index 61491aa047adeb5572835cc9f7a9ef0b2931c52b..a101d7b1ebbf14b820f5f2cd0ff390cf528891ed 100644 (file)
@@ -79,7 +79,7 @@ class pkgTagSection
       Stop = this->Stop;
    };
    
-   pkgTagSection() : Section(0), Stop(0) {};
+   pkgTagSection() : Section(0), TagCount(0), Stop(0) {};
 };
 
 class pkgTagFile
index 9de341df02f754fd62ea6c5b6df321b245bfd752..b0450e8032d0af47b25552ce827ed3253cc4de64 100644 (file)
@@ -869,9 +869,7 @@ struct TryToInstall {
 struct TryToRemove {
    pkgCacheFile* Cache;
    pkgProblemResolver* Fix;
-   bool FixBroken;
    bool PurgePkgs;
-   unsigned long AutoMarkChanged;
 
    TryToRemove(pkgCacheFile &Cache, pkgProblemResolver *PM) : Cache(&Cache), Fix(PM),
                                PurgePkgs(_config->FindB("APT::Get::Purge", false)) {};