Browse Source

fix: Member variable 'X' is not initialized in the constructor.

Reported-By: cppcheck
Git-Dch: Ignore
tags/debian/1.1.exp4
David Kalnischkies 7 years ago
parent
commit
25613a61f6
13 changed files with 29 additions and 32 deletions
  1. +6
    -15
      apt-pkg/acquire.cc
  2. +1
    -1
      apt-pkg/acquire.h
  3. +7
    -3
      apt-pkg/cdrom.cc
  4. +1
    -1
      apt-pkg/contrib/fileutl.cc
  5. +2
    -0
      apt-pkg/install-progress.cc
  6. +2
    -3
      apt-pkg/install-progress.h
  7. +1
    -1
      apt-pkg/metaindex.h
  8. +1
    -0
      apt-pkg/pkgcache.cc
  9. +1
    -1
      apt-pkg/pkgcachegen.h
  10. +1
    -1
      apt-pkg/tagfile.h
  11. +1
    -1
      ftparchive/sources.h
  12. +3
    -2
      methods/ftp.cc
  13. +2
    -3
      methods/https.h

+ 6
- 15
apt-pkg/acquire.cc View 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();
}


+ 1
- 1
apt-pkg/acquire.h View 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)
{


+ 7
- 3
apt-pkg/cdrom.cc View 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)
{

}
/*}}}*/



+ 1
- 1
apt-pkg/contrib/fileutl.cc View 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)
{


+ 2
- 0
apt-pkg/install-progress.cc View 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)


+ 2
- 3
apt-pkg/install-progress.h View 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) {};


+ 1
- 1
apt-pkg/metaindex.h View 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 */
}


+ 1
- 0
apt-pkg/pkgcache.cc View 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));



+ 1
- 1
apt-pkg/pkgcachegen.h View 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() {};
};
/*}}}*/


+ 1
- 1
apt-pkg/tagfile.h View 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];


+ 1
- 1
ftparchive/sources.h View 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() {


+ 3
- 2
methods/ftp.cc View 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;


+ 2
- 3
methods/https.h View 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();
};



Loading…
Cancel
Save