summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-11 19:20:53 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-11 19:20:53 +0200
commitdd6882853b4555a6113740afca417acbaa060043 (patch)
tree5d05673e84fd0f9209642fa13d016345d9360ca1
parentb40b7c380acbdcd84338bdcd253df32f1ef79ed8 (diff)
fix some cppcheck: (warning) Member variable is not initialized in the constructor.
-rw-r--r--apt-pkg/aptconfiguration.h3
-rw-r--r--apt-pkg/indexfile.cc3
-rw-r--r--apt-pkg/tagfile.h2
-rw-r--r--cmdline/apt-get.cc2
4 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h
index 1f0399dd2..e098d0fd6 100644
--- a/apt-pkg/aptconfiguration.h
+++ b/apt-pkg/aptconfiguration.h
@@ -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
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 37be87055..f18ddbfaa 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -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 /*{{{*/
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 61491aa04..a101d7b1e 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -79,7 +79,7 @@ class pkgTagSection
Stop = this->Stop;
};
- pkgTagSection() : Section(0), Stop(0) {};
+ pkgTagSection() : Section(0), TagCount(0), Stop(0) {};
};
class pkgTagFile
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 9de341df0..b0450e803 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -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)) {};