From 655122418d714f342b5d9789f45f8035f3fe8b9a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 1 Mar 2014 15:11:42 +0100 Subject: =?UTF-8?q?warning:=20unused=20parameter=20=E2=80=98foo=E2=80=99?= =?UTF-8?q?=20[-Wunused-parameter]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-By: gcc -Wunused-parameter Git-Dch: Ignore --- apt-inst/deb/debfile.cc | 2 +- apt-inst/dirstream.cc | 2 +- apt-inst/dirstream.h | 4 ++-- apt-inst/extract.cc | 2 +- apt-pkg/acquire-item.cc | 20 ++++++++++---------- apt-pkg/cachefile.cc | 4 ++-- apt-pkg/cacheset.cc | 28 ++++++++++++++-------------- apt-pkg/cdrom.cc | 2 +- apt-pkg/deb/debindexfile.h | 2 +- apt-pkg/deb/dpkgpm.cc | 2 +- apt-pkg/deb/dpkgpm.h | 4 ++-- apt-pkg/depcache.cc | 10 +++++----- apt-pkg/depcache.h | 2 +- apt-pkg/edsp.cc | 10 ++++------ apt-pkg/edsp.h | 6 ++---- apt-pkg/edsp/edspindexfile.cc | 2 +- apt-pkg/edsp/edsplistparser.cc | 4 ++-- apt-pkg/edsp/edspsystem.cc | 6 +++--- apt-pkg/indexcopy.cc | 2 +- apt-pkg/indexfile.cc | 6 +++--- apt-pkg/indexfile.h | 4 ++-- apt-pkg/install-progress.cc | 4 ++-- apt-pkg/install-progress.h | 18 +++++++++--------- apt-pkg/packagemanager.h | 4 ++-- apt-pkg/pkgcache.cc | 2 +- apt-pkg/pkgcachegen.cc | 2 +- apt-pkg/pkgcachegen.h | 4 ++-- apt-pkg/pkgrecords.h | 2 +- apt-pkg/policy.cc | 2 +- apt-pkg/vendor.cc | 2 +- apt-private/acqprogress.cc | 2 +- apt-private/private-cacheset.h | 8 ++++---- apt-private/private-moo.cc | 8 ++++---- apt-private/private-output.cc | 6 +++--- cmdline/apt-cache.cc | 12 ++++++------ cmdline/apt-cdrom.cc | 2 +- cmdline/apt-config.cc | 2 +- cmdline/apt-extracttemplates.cc | 2 +- cmdline/apt-get.cc | 10 +++++----- cmdline/apt-helper.cc | 2 +- cmdline/apt-internal-solver.cc | 2 +- cmdline/apt-mark.cc | 2 +- cmdline/apt.cc | 2 +- ftparchive/apt-ftparchive.cc | 2 +- ftparchive/contents.cc | 2 +- ftparchive/override.cc | 2 +- ftparchive/writer.cc | 6 +++--- methods/ftp.cc | 2 +- methods/gzip.cc | 2 +- methods/https.cc | 8 ++++---- methods/https.h | 16 ++++++++-------- methods/mirror.cc | 2 +- methods/rsh.cc | 4 ++-- test/interactive-helper/testdeb.cc | 7 ++++++- test/libapt/cdromreducesourcelist_test.cc | 2 +- test/libapt/configuration_test.cc | 2 +- test/libapt/fileutl_test.cc | 2 +- test/libapt/getarchitectures_test.cc | 2 +- test/libapt/globalerror_test.cc | 2 +- test/libapt/hashsums_test.cc | 5 +++++ test/libapt/parsedepends_test.cc | 2 +- test/libapt/sourcelist_test.cc | 2 +- test/libapt/strutil_test.cc | 2 +- test/libapt/tagfile_test.cc | 2 +- 64 files changed, 153 insertions(+), 147 deletions(-) diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index a811bbe88..8684f03f7 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -194,7 +194,7 @@ bool debDebFile::MemControlExtract::DoItem(Item &Itm,int &Fd) // --------------------------------------------------------------------- /* Just memcopy the block from the tar extractor and put it in the right place in the pre-allocated memory block. */ -bool debDebFile::MemControlExtract::Process(Item &Itm,const unsigned char *Data, +bool debDebFile::MemControlExtract::Process(Item &/*Itm*/,const unsigned char *Data, unsigned long Size,unsigned long Pos) { memcpy(Control + Pos, Data,Size); diff --git a/apt-inst/dirstream.cc b/apt-inst/dirstream.cc index e06c30a57..085a0dcbf 100644 --- a/apt-inst/dirstream.cc +++ b/apt-inst/dirstream.cc @@ -110,7 +110,7 @@ bool pkgDirStream::FinishedFile(Item &Itm,int Fd) // DirStream::Fail - Failed processing a file /*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgDirStream::Fail(Item &Itm,int Fd) +bool pkgDirStream::Fail(Item &/*Itm*/, int Fd) { if (Fd < 0) return true; diff --git a/apt-inst/dirstream.h b/apt-inst/dirstream.h index 9d1af2188..1be2688a1 100644 --- a/apt-inst/dirstream.h +++ b/apt-inst/dirstream.h @@ -49,8 +49,8 @@ class pkgDirStream virtual bool DoItem(Item &Itm,int &Fd); virtual bool Fail(Item &Itm,int Fd); virtual bool FinishedFile(Item &Itm,int Fd); - virtual bool Process(Item &Itm,const unsigned char *Data, - unsigned long Size,unsigned long Pos) {return true;}; + virtual bool Process(Item &/*Itm*/,const unsigned char * /*Data*/, + unsigned long /*Size*/,unsigned long /*Pos*/) {return true;}; virtual ~pkgDirStream() {}; }; diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc index b3dfccfc6..60edc702e 100644 --- a/apt-inst/extract.cc +++ b/apt-inst/extract.cc @@ -79,7 +79,7 @@ pkgExtract::pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver) : // Extract::DoItem - Handle a single item from the stream /*{{{*/ // --------------------------------------------------------------------- /* This performs the setup for the extraction.. */ -bool pkgExtract::DoItem(Item &Itm,int &Fd) +bool pkgExtract::DoItem(Item &Itm, int &/*Fd*/) { /* Strip any leading/trailing /s from the filename, then copy it to the temp buffer and re-apply the leading / We use a class variable diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 88b10d4b1..3b22743e7 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -108,8 +108,8 @@ void pkgAcquire::Item::Start(string /*Message*/,unsigned long long Size) // Acquire::Item::Done - Item downloaded OK /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgAcquire::Item::Done(string Message,unsigned long long Size,string Hash, - pkgAcquire::MethodConfig *Cnf) +void pkgAcquire::Item::Done(string Message,unsigned long long Size,string /*Hash*/, + pkgAcquire::MethodConfig * /*Cnf*/) { // We just downloaded something.. string FileName = LookupTag(Message,"Filename"); @@ -253,10 +253,10 @@ string pkgAcqSubIndex::Custom600Headers() return "\nIndex-File: true\nFail-Ignore: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } /*}}}*/ -void pkgAcqSubIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ +void pkgAcqSubIndex::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/ { if(Debug) - std::clog << "pkgAcqSubIndex failed: " << Desc.URI << std::endl; + std::clog << "pkgAcqSubIndex failed: " << Desc.URI << " with " << Message << std::endl; Complete = false; Status = StatDone; @@ -544,10 +544,10 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ return false; } /*}}}*/ -void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ +void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/ { if(Debug) - std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << std::endl + std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << " with " << Message << std::endl << "Falling back to normal index file acquire" << std::endl; new pkgAcqIndex(Owner, RealURI, Description, Desc.ShortDesc, @@ -624,10 +624,10 @@ pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner, } } /*}}}*/ -void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/ +void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/ { if(Debug) - std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << std::endl + std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << " with " << Message << std::endl << "Falling back to normal index file acquire" << std::endl; new pkgAcqIndex(Owner, RealURI, Description,Desc.ShortDesc, ExpectedHash); @@ -808,7 +808,7 @@ pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire *Owner, QueueURI(Desc); } /*}}}*/ -void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/ +void pkgAcqIndexMergeDiffs::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/)/*{{{*/ { if(Debug) std::clog << "pkgAcqIndexMergeDiffs failed: " << Desc.URI << " with " << Message << std::endl; @@ -1698,7 +1698,7 @@ bool pkgAcqMetaIndex::VerifyVendor(string Message) /*{{{*/ // pkgAcqMetaIndex::Failed - no Release file present or no signature file present /*{{{*/ // --------------------------------------------------------------------- /* */ -void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) +void pkgAcqMetaIndex::Failed(string Message,pkgAcquire::MethodConfig * /*Cnf*/) { if (AuthPass == true) { diff --git a/apt-pkg/cachefile.cc b/apt-pkg/cachefile.cc index 7c2276185..2401b015e 100644 --- a/apt-pkg/cachefile.cc +++ b/apt-pkg/cachefile.cc @@ -99,7 +99,7 @@ bool pkgCacheFile::BuildCaches(OpProgress *Progress, bool WithLock) // CacheFile::BuildSourceList - Open and build all relevant sources.list/*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgCacheFile::BuildSourceList(OpProgress *Progress) +bool pkgCacheFile::BuildSourceList(OpProgress * /*Progress*/) { if (SrcList != NULL) return true; @@ -113,7 +113,7 @@ bool pkgCacheFile::BuildSourceList(OpProgress *Progress) // CacheFile::BuildPolicy - Open and build all relevant preferences /*{{{*/ // --------------------------------------------------------------------- /* */ -bool pkgCacheFile::BuildPolicy(OpProgress *Progress) +bool pkgCacheFile::BuildPolicy(OpProgress * /*Progress*/) { if (Policy != NULL) return true; diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 6b6fdb5ad..8a30d00a2 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -588,13 +588,13 @@ pkgCache::PkgIterator CacheSetHelper::canNotFindPkgName(pkgCacheFile &Cache, } /*}}}*/ // canNotFindTask - handle the case no package is found for a task /*{{{*/ -void CacheSetHelper::canNotFindTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) { +void CacheSetHelper::canNotFindTask(PackageContainerInterface * const /*pci*/, pkgCacheFile &/*Cache*/, std::string pattern) { if (ShowError == true) _error->Insert(ErrorType, _("Couldn't find task '%s'"), pattern.c_str()); } /*}}}*/ // canNotFindRegEx - handle the case no package is found by a regex /*{{{*/ -void CacheSetHelper::canNotFindRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern) { +void CacheSetHelper::canNotFindRegEx(PackageContainerInterface * const /*pci*/, pkgCacheFile &/*Cache*/, std::string pattern) { if (ShowError == true) _error->Insert(ErrorType, _("Couldn't find any package by regex '%s'"), pattern.c_str()); } @@ -606,25 +606,25 @@ void CacheSetHelper::canNotFindFnmatch(PackageContainerInterface * const pci, pk } #endif /*}}}*/ // canNotFindPackage - handle the case no package is found from a string/*{{{*/ -void CacheSetHelper::canNotFindPackage(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &str) { +void CacheSetHelper::canNotFindPackage(PackageContainerInterface * const /*pci*/, pkgCacheFile &/*Cache*/, std::string const &/*str*/) { } /*}}}*/ // canNotFindAllVer /*{{{*/ -void CacheSetHelper::canNotFindAllVer(VersionContainerInterface * const vci, pkgCacheFile &Cache, +void CacheSetHelper::canNotFindAllVer(VersionContainerInterface * const /*vci*/, pkgCacheFile &/*Cache*/, pkgCache::PkgIterator const &Pkg) { if (ShowError == true) _error->Insert(ErrorType, _("Can't select versions from package '%s' as it is purely virtual"), Pkg.FullName(true).c_str()); } /*}}}*/ // canNotFindInstCandVer /*{{{*/ -void CacheSetHelper::canNotFindInstCandVer(VersionContainerInterface * const vci, pkgCacheFile &Cache, +void CacheSetHelper::canNotFindInstCandVer(VersionContainerInterface * const /*vci*/, pkgCacheFile &/*Cache*/, pkgCache::PkgIterator const &Pkg) { if (ShowError == true) _error->Insert(ErrorType, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg.FullName(true).c_str()); } /*}}}*/ // canNotFindInstCandVer /*{{{*/ -void CacheSetHelper::canNotFindCandInstVer(VersionContainerInterface * const vci, pkgCacheFile &Cache, +void CacheSetHelper::canNotFindCandInstVer(VersionContainerInterface * const /*vci*/, pkgCacheFile &/*Cache*/, pkgCache::PkgIterator const &Pkg) { if (ShowError == true) _error->Insert(ErrorType, _("Can't select installed nor candidate version from package '%s' as it has neither of them"), Pkg.FullName(true).c_str()); @@ -655,13 +655,13 @@ pkgCache::VerIterator CacheSetHelper::canNotFindInstalledVer(pkgCacheFile &Cache } /*}}}*/ // showTaskSelection /*{{{*/ -void CacheSetHelper::showTaskSelection(pkgCache::PkgIterator const &pkg, - std::string const &pattern) { +void CacheSetHelper::showTaskSelection(pkgCache::PkgIterator const &/*pkg*/, + std::string const &/*pattern*/) { } /*}}}*/ // showRegExSelection /*{{{*/ -void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const &pkg, - std::string const &pattern) { +void CacheSetHelper::showRegExSelection(pkgCache::PkgIterator const &/*pkg*/, + std::string const &/*pattern*/) { } /*}}}*/ #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) @@ -672,10 +672,10 @@ void CacheSetHelper::showFnmatchSelection(pkgCache::PkgIterator const &pkg, /*}}}*/ #endif // showSelectedVersion /*{{{*/ -void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const &Pkg, - pkgCache::VerIterator const Ver, - std::string const &ver, - bool const verIsRel) { +void CacheSetHelper::showSelectedVersion(pkgCache::PkgIterator const &/*Pkg*/, + pkgCache::VerIterator const /*Ver*/, + std::string const &/*ver*/, + bool const /*verIsRel*/) { } /*}}}*/ } diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index ea5ed7e92..6f946b030 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -369,7 +369,7 @@ bool pkgCdrom::DropRepeats(vector &List,const char *Name) // --------------------------------------------------------------------- /* This takes the list of source list expressed entires and collects similar ones to form a single entry for each dist */ -void pkgCdrom::ReduceSourcelist(string CD,vector &List) +void pkgCdrom::ReduceSourcelist(string /*CD*/,vector &List) { sort(List.begin(),List.end()); diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index 9e64d4476..e079d40c2 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -33,7 +33,7 @@ class debStatusIndex : public pkgIndexFile virtual const Type *GetType() const; // Interface for acquire - virtual std::string Describe(bool Short) const {return File;}; + virtual std::string Describe(bool /*Short*/) const {return File;}; // Interface for the Cache Generator virtual bool Exists() const; diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 91893c4e1..adf59516e 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1581,7 +1581,7 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress) return true; } -void SigINT(int sig) { +void SigINT(int /*sig*/) { pkgPackageManager::SigINTStop = true; } /*}}}*/ diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 02e12a6d9..c144f78e1 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -109,10 +109,10 @@ class pkgDPkgPM : public pkgPackageManager void DoDpkgStatusFd(int statusfd); void ProcessDpkgStatusLine(char *line); #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13) - void DoDpkgStatusFd(int statusfd, int unused) { + void DoDpkgStatusFd(int statusfd, int /*unused*/) { DoDpkgStatusFd(statusfd); } - void ProcessDpkgStatusLine(int unused, char *line) { + void ProcessDpkgStatusLine(int /*unused*/, char *line) { ProcessDpkgStatusLine(line); } #endif diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 946c1e254..b45f5d9b5 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -222,7 +222,7 @@ bool pkgDepCache::readStateFile(OpProgress *Prog) /*{{{*/ return true; } /*}}}*/ -bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) /*{{{*/ +bool pkgDepCache::writeStateFile(OpProgress * /*prog*/, bool InstalledOnly) /*{{{*/ { bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); @@ -868,7 +868,7 @@ bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge, return IsDeleteOkProtectInstallRequests(Pkg, rPurge, Depth, FromUser); } bool pkgDepCache::IsDeleteOkProtectInstallRequests(PkgIterator const &Pkg, - bool const rPurge, unsigned long const Depth, bool const FromUser) + bool const /*rPurge*/, unsigned long const Depth, bool const FromUser) { if (FromUser == false && Pkg->CurrentVer == 0) { @@ -1297,7 +1297,7 @@ bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst, return IsInstallOkMultiArchSameVersionSynced(Pkg,AutoInst, Depth, FromUser); } bool pkgDepCache::IsInstallOkMultiArchSameVersionSynced(PkgIterator const &Pkg, - bool const AutoInst, unsigned long const Depth, bool const FromUser) + bool const /*AutoInst*/, unsigned long const Depth, bool const FromUser) { if (FromUser == true) // as always: user is always right return true; @@ -1685,9 +1685,9 @@ bool pkgDepCache::Policy::IsImportantDep(DepIterator const &Dep) } /*}}}*/ // Policy::GetPriority - Get the priority of the package pin /*{{{*/ -signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const &Pkg) +signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgIterator const &/*Pkg*/) { return 0; } -signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const &File) +signed short pkgDepCache::Policy::GetPriority(pkgCache::PkgFileIterator const &/*File*/) { return 0; } /*}}}*/ pkgDepCache::InRootSetFunc *pkgDepCache::GetRootSetFunc() /*{{{*/ diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index a02a86b87..50f810806 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -61,7 +61,7 @@ class pkgDepCache : protected pkgCache::Namespace class InRootSetFunc { public: - virtual bool InRootSet(const pkgCache::PkgIterator &pkg) {return false;}; + virtual bool InRootSet(const pkgCache::PkgIterator &/*pkg*/) {return false;}; virtual ~InRootSetFunc() {}; }; diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index e90598392..dbd2dba46 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -44,7 +44,7 @@ bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress) for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver, ++p) { WriteScenarioVersion(Cache, output, Pkg, Ver); - WriteScenarioDependency(Cache, output, Pkg, Ver); + WriteScenarioDependency(output, Ver); fprintf(output, "\n"); if (Progress != NULL && p % 100 == 0) Progress->Progress(p); @@ -64,7 +64,7 @@ bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output, for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver) { WriteScenarioVersion(Cache, output, Pkg, Ver); - WriteScenarioLimitedDependency(Cache, output, Pkg, Ver, pkgset); + WriteScenarioLimitedDependency(output, Ver, pkgset); fprintf(output, "\n"); if (Progress != NULL && p % 100 == 0) Progress->Progress(p); @@ -111,8 +111,7 @@ void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgI } /*}}}*/ // EDSP::WriteScenarioDependency /*{{{*/ -void EDSP::WriteScenarioDependency(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg, - pkgCache::VerIterator const &Ver) +void EDSP::WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &Ver) { std::string dependencies[pkgCache::Dep::Enhances + 1]; bool orGroup = false; @@ -148,8 +147,7 @@ void EDSP::WriteScenarioDependency(pkgDepCache &Cache, FILE* output, pkgCache::P } /*}}}*/ // EDSP::WriteScenarioLimitedDependency /*{{{*/ -void EDSP::WriteScenarioLimitedDependency(pkgDepCache &Cache, FILE* output, - pkgCache::PkgIterator const &Pkg, +void EDSP::WriteScenarioLimitedDependency(FILE* output, pkgCache::VerIterator const &Ver, APT::PackageSet const &pkgset) { diff --git a/apt-pkg/edsp.h b/apt-pkg/edsp.h index fd4436f60..828ee3753 100644 --- a/apt-pkg/edsp.h +++ b/apt-pkg/edsp.h @@ -35,11 +35,9 @@ class EDSP /*{{{*/ void static WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const &Ver); - void static WriteScenarioDependency(pkgDepCache &Cache, FILE* output, - pkgCache::PkgIterator const &Pkg, + void static WriteScenarioDependency(FILE* output, pkgCache::VerIterator const &Ver); - void static WriteScenarioLimitedDependency(pkgDepCache &Cache, FILE* output, - pkgCache::PkgIterator const &Pkg, + void static WriteScenarioLimitedDependency(FILE* output, pkgCache::VerIterator const &Ver, APT::PackageSet const &pkgset); public: diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc index 98ce4497a..80b9f79ea 100644 --- a/apt-pkg/edsp/edspindexfile.cc +++ b/apt-pkg/edsp/edspindexfile.cc @@ -63,7 +63,7 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const class edspIFType: public pkgIndexFile::Type { public: - virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const + virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const { // we don't have a record parser for this type as the file is not presistent return NULL; diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index bcfdb1017..37959f37b 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -84,8 +84,8 @@ bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg, } /*}}}*/ // ListParser::LoadReleaseInfo - Load the release information /*{{{*/ -bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI, - FileFd &File, std::string component) +bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator & /*FileI*/, + FileFd & /*File*/, std::string /*component*/) { return true; } diff --git a/apt-pkg/edsp/edspsystem.cc b/apt-pkg/edsp/edspsystem.cc index aae969d9d..b509fa001 100644 --- a/apt-pkg/edsp/edspsystem.cc +++ b/apt-pkg/edsp/edspsystem.cc @@ -49,7 +49,7 @@ bool edspSystem::Lock() } /*}}}*/ // System::UnLock - Drop a lock /*{{{*/ -bool edspSystem::UnLock(bool NoErrors) +bool edspSystem::UnLock(bool /*NoErrors*/) { return true; } @@ -58,7 +58,7 @@ bool edspSystem::UnLock(bool NoErrors) // --------------------------------------------------------------------- /* we can't use edsp input as input for real installations - just a simulation can work, but everything else will fail bigtime */ -pkgPackageManager *edspSystem::CreatePM(pkgDepCache *Cache) const +pkgPackageManager *edspSystem::CreatePM(pkgDepCache * /*Cache*/) const { return NULL; } @@ -81,7 +81,7 @@ bool edspSystem::Initialize(Configuration &Cnf) } /*}}}*/ // System::ArchiveSupported - Is a file format supported /*{{{*/ -bool edspSystem::ArchiveSupported(const char *Type) +bool edspSystem::ArchiveSupported(const char * /*Type*/) { return false; } diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 38356df18..59afa86ec 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -551,7 +551,7 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/ } /*}}}*/ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector &SigList, /*{{{*/ - vector PkgList,vector SrcList) + vector /*PkgList*/,vector /*SrcList*/) { if (SigList.empty() == true) return true; diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc index 642a750d4..875c80336 100644 --- a/apt-pkg/indexfile.cc +++ b/apt-pkg/indexfile.cc @@ -47,7 +47,7 @@ pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type) // IndexFile::ArchiveInfo - Stub /*{{{*/ // --------------------------------------------------------------------- /* */ -std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const +std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator /*Ver*/) const { return std::string(); } @@ -63,8 +63,8 @@ pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const // IndexFile::SourceIndex - Stub /*{{{*/ // --------------------------------------------------------------------- /* */ -std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record, - pkgSrcRecords::File const &File) const +std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &/*Record*/, + pkgSrcRecords::File const &/*File*/) const { return std::string(); } diff --git a/apt-pkg/indexfile.h b/apt-pkg/indexfile.h index a0096fa34..9a5c74200 100644 --- a/apt-pkg/indexfile.h +++ b/apt-pkg/indexfile.h @@ -78,10 +78,10 @@ class pkgIndexFile virtual bool Exists() const = 0; virtual bool HasPackages() const = 0; virtual unsigned long Size() const = 0; - virtual bool Merge(pkgCacheGenerator &Gen, OpProgress* Prog) const { return false; }; + virtual bool Merge(pkgCacheGenerator &/*Gen*/, OpProgress* /*Prog*/) const { return false; }; __deprecated virtual bool Merge(pkgCacheGenerator &Gen, OpProgress &Prog) const { return Merge(Gen, &Prog); }; - virtual bool MergeFileProvides(pkgCacheGenerator &Gen,OpProgress* Prog) const {return true;}; + virtual bool MergeFileProvides(pkgCacheGenerator &/*Gen*/,OpProgress* /*Prog*/) const {return true;}; __deprecated virtual bool MergeFileProvides(pkgCacheGenerator &Gen, OpProgress &Prog) const {return MergeFileProvides(Gen, &Prog);}; virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index aec744360..657330b60 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -41,10 +41,10 @@ PackageManager* PackageManagerProgressFactory() return progress; } -bool PackageManager::StatusChanged(std::string PackageName, +bool PackageManager::StatusChanged(std::string /*PackageName*/, unsigned int StepsDone, unsigned int TotalSteps, - std::string HumanReadableAction) + std::string /*HumanReadableAction*/) { int reporting_steps = _config->FindI("DpkgPM::Reporting-Steps", 1); percentage = StepsDone/(float)TotalSteps * 100.0; diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h index 8bcc32927..baf245376 100644 --- a/apt-pkg/install-progress.h +++ b/apt-pkg/install-progress.h @@ -29,7 +29,7 @@ namespace Progress { virtual ~PackageManager() {}; /* Global Start/Stop */ - virtual void Start(int child_pty=-1) {}; + virtual void Start(int /*child_pty*/=-1) {}; virtual void Stop() {}; /* When dpkg is invoked (may happen multiple times for each @@ -48,14 +48,14 @@ namespace Progress { unsigned int StepsDone, unsigned int TotalSteps, std::string HumanReadableAction); - virtual void Error(std::string PackageName, - unsigned int StepsDone, - unsigned int TotalSteps, - std::string ErrorMessage) {} - virtual void ConffilePrompt(std::string PackageName, - unsigned int StepsDone, - unsigned int TotalSteps, - std::string ConfMessage) {} + virtual void Error(std::string /*PackageName*/, + unsigned int /*StepsDone*/, + unsigned int /*TotalSteps*/, + std::string /*ErrorMessage*/) {} + virtual void ConffilePrompt(std::string /*PackageName*/, + unsigned int /*StepsDone*/, + unsigned int /*TotalSteps*/, + std::string /*ConfMessage*/) {} }; class PackageManagerProgressFd : public PackageManager diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 853b9bac8..d684463eb 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -89,9 +89,9 @@ class pkgPackageManager : protected pkgCache::Namespace virtual bool Configure(PkgIterator /*Pkg*/) {return false;}; virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;}; #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) - virtual bool Go(APT::Progress::PackageManager *progress) {return true;}; + virtual bool Go(APT::Progress::PackageManager * /*progress*/) {return true;}; #else - virtual bool Go(int statusFd=-1) {return true;}; + virtual bool Go(int /*statusFd*/=-1) {return true;}; #endif virtual void Reset() {}; diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 7d57640c5..9c14e626e 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -695,7 +695,7 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End) // --------------------------------------------------------------------- /* Deps like self-conflicts should be ignored as well as implicit conflicts on virtual packages. */ -bool pkgCache::DepIterator::IsIgnorable(PkgIterator const &Pkg) const +bool pkgCache::DepIterator::IsIgnorable(PkgIterator const &/*Pkg*/) const { if (IsNegative() == false) return false; diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 006f3952b..185b9ca45 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1580,7 +1580,7 @@ static bool IsDuplicateDescription(pkgCache::DescIterator Desc, } /*}}}*/ // CacheGenerator::FinishCache /*{{{*/ -bool pkgCacheGenerator::FinishCache(OpProgress *Progress) +bool pkgCacheGenerator::FinishCache(OpProgress * /*Progress*/) { return true; } diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 428e8459b..e8901025e 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -170,8 +170,8 @@ class pkgCacheGenerator::ListParser virtual bool Step() = 0; inline bool HasFileDeps() {return FoundFileDeps;}; - virtual bool CollectFileProvides(pkgCache &Cache, - pkgCache::VerIterator &Ver) {return true;}; + virtual bool CollectFileProvides(pkgCache &/*Cache*/, + pkgCache::VerIterator &/*Ver*/) {return true;}; ListParser() : FoundFileDeps(false) {}; virtual ~ListParser() {}; diff --git a/apt-pkg/pkgrecords.h b/apt-pkg/pkgrecords.h index 3658435e8..ca0984bbf 100644 --- a/apt-pkg/pkgrecords.h +++ b/apt-pkg/pkgrecords.h @@ -70,7 +70,7 @@ class pkgRecords::Parser /*{{{*/ virtual std::string Homepage() {return std::string();} // An arbitrary custom field - virtual std::string RecordField(const char *fieldName) { return std::string();}; + virtual std::string RecordField(const char * /*fieldName*/) { return std::string();}; // The record in binary form virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;}; diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index d0f97441d..2176f1f42 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -349,7 +349,7 @@ signed short pkgPolicy::GetPriority(pkgCache::PkgFileIterator const &File) all over the place rather than forcing a special format */ class PreferenceSection : public pkgTagSection { - void TrimRecord(bool BeforeRecord, const char* &End) + void TrimRecord(bool /*BeforeRecord*/, const char* &End) { for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r' || Stop[0] == '#'); Stop++) if (Stop[0] == '#') diff --git a/apt-pkg/vendor.cc b/apt-pkg/vendor.cc index fc03ec845..f19534171 100644 --- a/apt-pkg/vendor.cc +++ b/apt-pkg/vendor.cc @@ -31,7 +31,7 @@ const std::string Vendor::LookupFingerprint(std::string Print) const return (*Elt).second; } -bool Vendor::CheckDist(std::string Dist) +bool Vendor::CheckDist(std::string /*Dist*/) { return true; } diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc index 66e1600f1..d08ed072f 100644 --- a/apt-private/acqprogress.cc +++ b/apt-private/acqprogress.cc @@ -93,7 +93,7 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm) // AcqTextStatus::Done - Completed a download /*{{{*/ // --------------------------------------------------------------------- /* We don't display anything... */ -void AcqTextStatus::Done(pkgAcquire::ItemDesc &Itm) +void AcqTextStatus::Done(pkgAcquire::ItemDesc &/*Itm*/) { Update = true; } diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h index 322b3be6b..26c7f1ac2 100644 --- a/apt-private/private-cacheset.h +++ b/apt-private/private-cacheset.h @@ -42,8 +42,8 @@ typedef APT::VersionContainer< class Matcher { public: - virtual bool operator () (const pkgCache::PkgIterator &P) { - return true;}; + virtual bool operator () (const pkgCache::PkgIterator &/*P*/) { + return true;} }; // FIXME: add default argument for OpProgress (or overloaded function) @@ -111,8 +111,8 @@ public: Pkg.FullName(true).c_str(), pattern.c_str()); explicitlyNamed = false; } - virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver, - std::string const &ver, bool const verIsRel) { + virtual void showSelectedVersion(pkgCache::PkgIterator const &/*Pkg*/, pkgCache::VerIterator const Ver, + std::string const &ver, bool const /*verIsRel*/) { if (ver == Ver.VerStr()) return; selectedByRelease.push_back(make_pair(Ver, ver)); diff --git a/apt-private/private-moo.cc b/apt-private/private-moo.cc index 5d247041d..9c4f6bf15 100644 --- a/apt-private/private-moo.cc +++ b/apt-private/private-moo.cc @@ -65,7 +65,7 @@ static bool printMooLine() { /*{{{*/ return true; } /*}}}*/ -bool DoMoo1(CommandLine &CmdL) /*{{{*/ +bool DoMoo1(CommandLine &) /*{{{*/ { // our trustworthy super cow since 2001 if (_config->FindI("quiet") >= 2) @@ -83,7 +83,7 @@ bool DoMoo1(CommandLine &CmdL) /*{{{*/ return true; } /*}}}*/ -bool DoMoo2(CommandLine &CmdL) /*{{{*/ +bool DoMoo2(CommandLine &) /*{{{*/ { // by Fernando Ribeiro in lp:56125 if (_config->FindI("quiet") >= 2) @@ -117,7 +117,7 @@ bool DoMoo2(CommandLine &CmdL) /*{{{*/ return true; } /*}}}*/ -bool DoMoo3(CommandLine &CmdL) /*{{{*/ +bool DoMoo3(CommandLine &) /*{{{*/ { // by Robert Millan in deb:134156 if (_config->FindI("quiet") >= 2) @@ -134,7 +134,7 @@ bool DoMoo3(CommandLine &CmdL) /*{{{*/ return true; } /*}}}*/ -bool DoMooApril(CommandLine &CmdL) /*{{{*/ +bool DoMooApril(CommandLine &) /*{{{*/ { // by Christopher Allan Webber and proposed by Paul Tagliamonte // in a "Community outreach": https://lists.debian.org/debian-devel/2013/04/msg00045.html diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc index dec518392..52f65d794 100644 --- a/apt-private/private-output.cc +++ b/apt-private/private-output.cc @@ -63,7 +63,7 @@ bool InitOutput() /*{{{*/ return true; } /*}}}*/ -static std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) /*{{{*/ +static std::string GetArchiveSuite(pkgCacheFile &/*CacheFile*/, pkgCache::VerIterator ver) /*{{{*/ { std::string suite = ""; if (ver && ver.FileList() && ver.FileList()) @@ -107,14 +107,14 @@ static std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIte return cand ? cand.VerStr() : "(none)"; } /*}}}*/ -static std::string GetInstalledVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ +static std::string GetInstalledVersion(pkgCacheFile &/*CacheFile*/, pkgCache::PkgIterator P)/*{{{*/ { pkgCache::VerIterator inst = P.CurrentVer(); return inst ? inst.VerStr() : "(none)"; } /*}}}*/ -static std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)/*{{{*/ +static std::string GetVersion(pkgCacheFile &/*CacheFile*/, pkgCache::VerIterator V)/*{{{*/ { pkgCache::PkgIterator P = V.ParentPkg(); if (V == P.CurrentVer()) diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 7e569f2fc..d50e0c724 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -258,7 +258,7 @@ static bool DumpPackage(CommandLine &CmdL) // Stats - Dump some nice statistics /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool Stats(CommandLine &Cmd) +static bool Stats(CommandLine &) { pkgCacheFile CacheFile; pkgCache *Cache = CacheFile.GetPkgCache(); @@ -371,7 +371,7 @@ static bool Stats(CommandLine &Cmd) // Dump - show everything /*{{{*/ // --------------------------------------------------------------------- /* This is worthless except fer debugging things */ -static bool Dump(CommandLine &Cmd) +static bool Dump(CommandLine &) { pkgCacheFile CacheFile; pkgCache *Cache = CacheFile.GetPkgCache(); @@ -423,7 +423,7 @@ static bool Dump(CommandLine &Cmd) // --------------------------------------------------------------------- /* This is needed to make dpkg --merge happy.. I spent a bit of time to make this run really fast, perhaps I went a little overboard.. */ -static bool DumpAvail(CommandLine &Cmd) +static bool DumpAvail(CommandLine &) { pkgCacheFile CacheFile; pkgCache *Cache = CacheFile.GetPkgCache(); @@ -1388,7 +1388,7 @@ static bool Search(CommandLine &CmdL) } /*}}}*/ /* ShowAuto - show automatically installed packages (sorted) {{{*/ -static bool ShowAuto(CommandLine &CmdL) +static bool ShowAuto(CommandLine &) { pkgCacheFile CacheFile; pkgCache *Cache = CacheFile.GetPkgCache(); @@ -1717,7 +1717,7 @@ static bool Madison(CommandLine &CmdL) // GenCaches - Call the main cache generator /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool GenCaches(CommandLine &Cmd) +static bool GenCaches(CommandLine &) { OpTextProgress Progress(*_config); @@ -1728,7 +1728,7 @@ static bool GenCaches(CommandLine &Cmd) // ShowHelp - Show a help screen /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool ShowHelp(CommandLine &Cmd) +static bool ShowHelp(CommandLine &) { ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index dc0e050c3..8e1d27e52 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -93,7 +93,7 @@ bool pkgCdromTextStatus::AskCdromName(string &name) } -void pkgCdromTextStatus::Update(string text, int current) +void pkgCdromTextStatus::Update(string text, int /*current*/) { if(text.size() > 0) cout << text << flush; diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index e83c4b64b..26f0ea161 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -78,7 +78,7 @@ static bool DoDump(CommandLine &CmdL) // ShowHelp - Show the help screen /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool ShowHelp(CommandLine &CmdL) +static bool ShowHelp(CommandLine &) { ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index 2b01968e3..a27008233 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -137,7 +137,7 @@ bool DebFile::DoItem(Item &I, int &Fd) // DebFile::Process examine element in package and copy /*{{{*/ // --------------------------------------------------------------------- /* */ -bool DebFile::Process(Item &I, const unsigned char *data, +bool DebFile::Process(Item &/*I*/, const unsigned char *data, unsigned long size, unsigned long pos) { switch (Which) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 253b2f4a5..9a4eb0881 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -475,7 +475,7 @@ static bool DoMarkAuto(CommandLine &CmdL) // DoDSelectUpgrade - Do an upgrade by following dselects selections /*{{{*/ // --------------------------------------------------------------------- /* Follows dselect's selections */ -static bool DoDSelectUpgrade(CommandLine &CmdL) +static bool DoDSelectUpgrade(CommandLine &) { CacheFile Cache; if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false) @@ -551,7 +551,7 @@ static bool DoDSelectUpgrade(CommandLine &CmdL) // DoClean - Remove download archives /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool DoClean(CommandLine &CmdL) +static bool DoClean(CommandLine &) { std::string const archivedir = _config->FindDir("Dir::Cache::archives"); std::string const pkgcache = _config->FindFile("Dir::cache::pkgcache"); @@ -599,7 +599,7 @@ class LogCleaner : public pkgArchiveCleaner }; }; -static bool DoAutoClean(CommandLine &CmdL) +static bool DoAutoClean(CommandLine &) { // Lock the archive directory FileFd Lock; @@ -696,7 +696,7 @@ static bool DoDownload(CommandLine &CmdL) // --------------------------------------------------------------------- /* Opening automatically checks the system, this command is mostly used for debugging */ -static bool DoCheck(CommandLine &CmdL) +static bool DoCheck(CommandLine &) { CacheFile Cache; Cache.Open(); @@ -1581,7 +1581,7 @@ static bool DoChangelog(CommandLine &CmdL) // ShowHelp - Show a help screen /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool ShowHelp(CommandLine &CmdL) +static bool ShowHelp(CommandLine &) { ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc index d8ea0435a..8ff2fa037 100644 --- a/cmdline/apt-helper.cc +++ b/cmdline/apt-helper.cc @@ -55,7 +55,7 @@ static bool DoDownloadFile(CommandLine &CmdL) return true; } -static bool ShowHelp(CommandLine &CmdL) +static bool ShowHelp(CommandLine &) { ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc index 108e86b9a..0c2ff0f43 100644 --- a/cmdline/apt-internal-solver.cc +++ b/cmdline/apt-internal-solver.cc @@ -30,7 +30,7 @@ // ShowHelp - Show a help screen /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool ShowHelp(CommandLine &CmdL) { +static bool ShowHelp(CommandLine &) { ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index 1af17cd7a..53b5ec158 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -372,7 +372,7 @@ static bool ShowHold(CommandLine &CmdL) // ShowHelp - Show a help screen /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool ShowHelp(CommandLine &CmdL) +static bool ShowHelp(CommandLine &) { ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/cmdline/apt.cc b/cmdline/apt.cc index 040ed6c25..1b7626948 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -61,7 +61,7 @@ -static bool ShowHelp(CommandLine &CmdL) +static bool ShowHelp(CommandLine &) { ioprintf(c1out,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index c28ad5c5c..f13e4648a 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -586,7 +586,7 @@ static void LoadBinDir(vector &PkgList,Configuration &Setup) // ShowHelp - Show the help text /*{{{*/ // --------------------------------------------------------------------- /* */ -static bool ShowHelp(CommandLine &CmdL) +static bool ShowHelp(CommandLine &) { ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc index 80fe6e17e..be4d2a61e 100644 --- a/ftparchive/contents.cc +++ b/ftparchive/contents.cc @@ -316,7 +316,7 @@ bool ContentsExtract::Read(debDebFile &Deb) // ContentsExtract::DoItem - Extract an item /*{{{*/ // --------------------------------------------------------------------- /* This just tacks the name onto the end of our memory buffer */ -bool ContentsExtract::DoItem(Item &Itm,int &Fd) +bool ContentsExtract::DoItem(Item &Itm, int &/*Fd*/) { unsigned long Len = strlen(Itm.Name); diff --git a/ftparchive/override.cc b/ftparchive/override.cc index 82cbc4c19..38d76a6a3 100644 --- a/ftparchive/override.cc +++ b/ftparchive/override.cc @@ -129,7 +129,7 @@ bool Override::ReadOverride(string const &File,bool const &Source) // Override::ReadExtraOverride - Read the extra override file /*{{{*/ // --------------------------------------------------------------------- /* This parses the extra override file and reads it into the map */ -bool Override::ReadExtraOverride(string const &File,bool const &Source) +bool Override::ReadExtraOverride(string const &File,bool const &/*Source*/) { if (File.empty() == true) return true; diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index 7ecfe78ed..edc0fddea 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -72,9 +72,9 @@ FTWScanner::FTWScanner(string const &Arch): Arch(Arch) /*}}}*/ // FTWScanner::Scanner - FTW Scanner /*{{{*/ // --------------------------------------------------------------------- -/* This is the FTW scanner, it processes each directory element in the +/* This is the FTW scanner, it processes each directory element in the directory tree. */ -int FTWScanner::ScannerFTW(const char *File,const struct stat *sb,int Flag) +int FTWScanner::ScannerFTW(const char *File,const struct stat * /*sb*/,int Flag) { if (Flag == FTW_DNR) { @@ -951,7 +951,7 @@ bool ContentsWriter::ReadFromPkgs(string const &PkgFile,string const &PkgCompres // ReleaseWriter::ReleaseWriter - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -ReleaseWriter::ReleaseWriter(string const &DB) +ReleaseWriter::ReleaseWriter(string const &/*DB*/) { if (_config->FindB("APT::FTPArchive::Release::Default-Patterns", true) == true) { diff --git a/methods/ftp.cc b/methods/ftp.cc index 5a87ded1c..4108b2da3 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -1098,7 +1098,7 @@ bool FtpMethod::Fetch(FetchItem *Itm) } /*}}}*/ -int main(int argc,const char *argv[]) +int main(int, const char *argv[]) { setlocale(LC_ALL, ""); diff --git a/methods/gzip.cc b/methods/gzip.cc index a2844e969..3269ffbb8 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -120,7 +120,7 @@ bool GzipMethod::Fetch(FetchItem *Itm) } /*}}}*/ -int main(int argc, char *argv[]) +int main(int, char *argv[]) { setlocale(LC_ALL, ""); diff --git a/methods/https.cc b/methods/https.cc index b0c7ee71d..041214179 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -83,9 +83,9 @@ HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp) return size*nmemb; } -int -HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow, - double ultotal, double ulnow) +int +HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/, + double /*ultotal*/, double /*ulnow*/) { HttpsMethod *me = (HttpsMethod *)clientp; if(dltotal > 0 && me->Res.Size == 0) { @@ -95,7 +95,7 @@ HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow, } // HttpsServerState::HttpsServerState - Constructor /*{{{*/ -HttpsServerState::HttpsServerState(URI Srv,HttpsMethod *Owner) : ServerState(Srv, NULL) +HttpsServerState::HttpsServerState(URI Srv,HttpsMethod * /*Owner*/) : ServerState(Srv, NULL) { TimeOut = _config->FindI("Acquire::https::Timeout",TimeOut); Reset(); diff --git a/methods/https.h b/methods/https.h index ab0dd3407..3199b29f2 100644 --- a/methods/https.h +++ b/methods/https.h @@ -25,23 +25,23 @@ class FileFd; class HttpsServerState : public ServerState { protected: - virtual bool ReadHeaderLines(std::string &Data) { return false; } - virtual bool LoadNextResponse(bool const ToFile, FileFd * const File) { return false; } + virtual bool ReadHeaderLines(std::string &/*Data*/) { return false; } + virtual bool LoadNextResponse(bool const /*ToFile*/, FileFd * const /*File*/) { return false; } public: - virtual bool WriteResponse(std::string const &Data) { return false; } + virtual bool WriteResponse(std::string const &/*Data*/) { return false; } /** \brief Transfer the data from the socket */ - virtual bool RunData(FileFd * const File) { return false; } + virtual bool RunData(FileFd * const /*File*/) { return false; } virtual bool Open() { return false; } virtual bool IsOpen() { return false; } virtual bool Close() { return false; } - virtual bool InitHashes(FileFd &File) { return false; } + virtual bool InitHashes(FileFd &/*File*/) { return false; } virtual Hashes * GetHashes() { return NULL; } - virtual bool Die(FileFd &File) { return false; } - virtual bool Flush(FileFd * const File) { return false; } - virtual bool Go(bool ToFile, FileFd * const File) { return false; } + virtual bool Die(FileFd &/*File*/) { return false; } + virtual bool Flush(FileFd * const /*File*/) { return false; } + virtual bool Go(bool /*ToFile*/, FileFd * const /*File*/) { return false; } HttpsServerState(URI Srv, HttpsMethod *Owner); virtual ~HttpsServerState() {Close();}; diff --git a/methods/mirror.cc b/methods/mirror.cc index 977eddcf5..b30636758 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -132,7 +132,7 @@ bool MirrorMethod::Clean(string Dir) } -bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) +bool MirrorMethod::DownloadMirrorFile(string /*mirror_uri_str*/) { // not that great to use pkgAcquire here, but we do not have // any other way right now diff --git a/methods/rsh.cc b/methods/rsh.cc index f065f6b89..8088cac38 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -390,7 +390,7 @@ bool RSHMethod::Configuration(std::string Message) // RSHMethod::SigTerm - Clean up and timestamp the files on exit /*{{{*/ // --------------------------------------------------------------------- /* */ -void RSHMethod::SigTerm(int sig) +void RSHMethod::SigTerm(int) { if (FailFd == -1) _exit(100); @@ -519,7 +519,7 @@ bool RSHMethod::Fetch(FetchItem *Itm) } /*}}}*/ -int main(int argc, const char *argv[]) +int main(int, const char *argv[]) { setlocale(LC_ALL, ""); diff --git a/test/interactive-helper/testdeb.cc b/test/interactive-helper/testdeb.cc index 89375af13..9520d1b50 100644 --- a/test/interactive-helper/testdeb.cc +++ b/test/interactive-helper/testdeb.cc @@ -6,7 +6,7 @@ class NullStream : public pkgDirStream { public: - virtual bool DoItem(Item &Itm,int &Fd) {return true;}; + virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) {return true;}; }; static bool Test(const char *File) @@ -33,6 +33,11 @@ static bool Test(const char *File) int main(int argc, const char *argv[]) { + if (argc != 2) { + std::cout << "One parameter expected - given " << argc << std::endl; + return 100; + } + Test(argv[1]); _error->DumpErrors(); return 0; diff --git a/test/libapt/cdromreducesourcelist_test.cc b/test/libapt/cdromreducesourcelist_test.cc index 729da23a6..b0314769d 100644 --- a/test/libapt/cdromreducesourcelist_test.cc +++ b/test/libapt/cdromreducesourcelist_test.cc @@ -15,7 +15,7 @@ public: } }; -int main(int argc, char const *argv[]) { +int main() { Cdrom cd; std::vector List; std::string CD("/media/cdrom/"); diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc index 957e905d5..d2efc1b4b 100644 --- a/test/libapt/configuration_test.cc +++ b/test/libapt/configuration_test.cc @@ -5,7 +5,7 @@ #include "assert.h" -int main(int argc,const char *argv[]) { +int main() { Configuration Cnf; std::vector fds; diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc index 462bdefd9..d256ea55a 100644 --- a/test/libapt/fileutl_test.cc +++ b/test/libapt/fileutl_test.cc @@ -10,7 +10,7 @@ #include -int main(int argc,char *argv[]) +int main() { std::vector files; diff --git a/test/libapt/getarchitectures_test.cc b/test/libapt/getarchitectures_test.cc index 807469263..508d5e458 100644 --- a/test/libapt/getarchitectures_test.cc +++ b/test/libapt/getarchitectures_test.cc @@ -7,7 +7,7 @@ #include -int main(int argc,char *argv[]) +int main() { std::vector vec; diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc index b6939231d..742fa53bd 100644 --- a/test/libapt/globalerror_test.cc +++ b/test/libapt/globalerror_test.cc @@ -5,7 +5,7 @@ #include #include -int main(int argc,char *argv[]) +int main() { std::string const textOfErrnoZero(strerror(0)); diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc index 3da89052b..410e2c44d 100644 --- a/test/libapt/hashsums_test.cc +++ b/test/libapt/hashsums_test.cc @@ -43,6 +43,11 @@ template void TestMill(const char *Out) int main(int argc, char** argv) { + if (argc != 6) { + std::cout << "Five parameter expected - given " << argc << std::endl; + return 100; + } + // test HashSumValue which doesn't calculate but just stores sums { string md5sum = argv[2]; diff --git a/test/libapt/parsedepends_test.cc b/test/libapt/parsedepends_test.cc index 67dbab823..5a2c65573 100644 --- a/test/libapt/parsedepends_test.cc +++ b/test/libapt/parsedepends_test.cc @@ -3,7 +3,7 @@ #include "assert.h" -int main(int argc,char *argv[]) { +int main() { std::string Package; std::string Version; unsigned int Op = 5; diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc index e79b6d65e..0637df03b 100644 --- a/test/libapt/sourcelist_test.cc +++ b/test/libapt/sourcelist_test.cc @@ -19,7 +19,7 @@ static void remove_tmpfile(void) } } -int main(int argc, char *argv[]) +int main() { _config->Set("APT::Sources::Use-Deb822", true); diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc index 8215654d0..a4516e7a1 100644 --- a/test/libapt/strutil_test.cc +++ b/test/libapt/strutil_test.cc @@ -2,7 +2,7 @@ #include "assert.h" -int main(int argc,char *argv[]) +int main() { std::string input, output, expected; diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc index effc3244b..24f258275 100644 --- a/test/libapt/tagfile_test.cc +++ b/test/libapt/tagfile_test.cc @@ -19,7 +19,7 @@ static void remove_tmpfile(void) } } -int main(int argc, char *argv[]) +int main() { FileFd fd; const char contents[] = "FieldA-12345678: the value of the field"; -- cgit v1.2.3