diff options
author | Michael Vogt <mvo@debian.org> | 2013-08-08 15:40:15 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-08-08 15:40:15 +0200 |
commit | f52037d629aea696f938015e7f1ec037eb079af8 (patch) | |
tree | 925b27ed34466ec12778ba90728b0d1b358fc7f8 /apt-pkg | |
parent | e9737c7f6a3e03b2975927ef9b04c1194026ed9c (diff) |
fix -Wall errors
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 6 | ||||
-rw-r--r-- | apt-pkg/tagfile.h | 2 | ||||
-rw-r--r-- | apt-pkg/vendorlist.cc | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index b0bd6b184..34ae4e593 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -134,7 +134,8 @@ static void dpkgChrootDirectory() std::cerr << "Chrooting into " << chrootDir << std::endl; if (chroot(chrootDir.c_str()) != 0) _exit(100); - chdir("/"); + if (chdir("/") != 0) + _exit(100); } /*}}}*/ @@ -755,7 +756,8 @@ bool pkgDPkgPM::OpenLog() pw = getpwnam("root"); gr = getgrnam("adm"); if (pw != NULL && gr != NULL) - chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid); + if(chown(logfile_name.c_str(), pw->pw_uid, gr->gr_gid) != 0) + _error->Errno("OpenLog", "chown failed"); chmod(logfile_name.c_str(), 0640); fprintf(d->term_out, "\nLog started: %s\n", timestr); } diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 126f4219d..fedd72701 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -84,7 +84,7 @@ class pkgTagSection Stop = this->Stop; }; - pkgTagSection() : Section(0), TagCount(0), Stop(0), d(NULL) {}; + pkgTagSection() : Section(0), TagCount(0), d(NULL), Stop(0) {}; virtual ~pkgTagSection() {}; }; diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc index ecfc7db87..602425624 100644 --- a/apt-pkg/vendorlist.cc +++ b/apt-pkg/vendorlist.cc @@ -66,7 +66,7 @@ bool pkgVendorList::CreateList(Configuration& Cnf) /*{{{*/ Configuration Block(Top); string VendorID = Top->Tag; vector <struct Vendor::Fingerprint *> *Fingerprints = new vector<Vendor::Fingerprint *>; - struct Vendor::Fingerprint *Fingerprint = new struct Vendor::Fingerprint; + struct Vendor::Fingerprint *Fingerprint = new struct Vendor::Fingerprint(); string Origin = Block.Find("Origin"); Fingerprint->Print = Block.Find("Fingerprint"); |