From d3e8fbb395f57954acd7a2095f02ce530a05ec6a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 27 Feb 2014 01:20:53 +0100 Subject: =?UTF-8?q?warning:=20extra=20=E2=80=98;=E2=80=99=20[-Wpedantic]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Git-Dch: Ignore Reported-By: gcc -Wpedantic --- apt-pkg/pkgcache.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 67a2a709d..7d57640c5 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -414,7 +414,7 @@ pkgCache::PkgIterator pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const // GrpIterator::operator ++ - Postfix incr /*{{{*/ // --------------------------------------------------------------------- /* This will advance to the next logical group in the hash table. */ -void pkgCache::GrpIterator::operator ++(int) +void pkgCache::GrpIterator::operator ++(int) { // Follow the current links if (S != Owner->GrpP) @@ -426,12 +426,12 @@ void pkgCache::GrpIterator::operator ++(int) HashIndex++; S = Owner->GrpP + Owner->HeaderP->GrpHashTable[HashIndex]; } -}; +} /*}}}*/ // PkgIterator::operator ++ - Postfix incr /*{{{*/ // --------------------------------------------------------------------- /* This will advance to the next logical package in the hash table. */ -void pkgCache::PkgIterator::operator ++(int) +void pkgCache::PkgIterator::operator ++(int) { // Follow the current links if (S != Owner->PkgP) @@ -443,7 +443,7 @@ void pkgCache::PkgIterator::operator ++(int) HashIndex++; S = Owner->PkgP + Owner->HeaderP->PkgHashTable[HashIndex]; } -}; +} /*}}}*/ // PkgIterator::State - Check the State of the package /*{{{*/ // --------------------------------------------------------------------- @@ -475,26 +475,26 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const // --------------------------------------------------------------------- /* Return string representing of the candidate version. */ const char * -pkgCache::PkgIterator::CandVersion() const +pkgCache::PkgIterator::CandVersion() const { //TargetVer is empty, so don't use it. VerIterator version = pkgPolicy(Owner).GetCandidateVer(*this); if (version.IsGood()) return version.VerStr(); return 0; -}; +} /*}}}*/ // PkgIterator::CurVersion - Returns the current version string /*{{{*/ // --------------------------------------------------------------------- /* Return string representing of the current version. */ const char * -pkgCache::PkgIterator::CurVersion() const +pkgCache::PkgIterator::CurVersion() const { VerIterator version = CurrentVer(); if (version.IsGood()) return CurrentVer().VerStr(); return 0; -}; +} /*}}}*/ // ostream operator to handle string representation of a package /*{{{*/ // --------------------------------------------------------------------- @@ -978,7 +978,7 @@ string pkgCache::PkgFileIterator::RelStr() /*}}}*/ // VerIterator::TranslatedDescription - Return the a DescIter for locale/*{{{*/ // --------------------------------------------------------------------- -/* return a DescIter for the current locale or the default if none is +/* return a DescIter for the current locale or the default if none is * found */ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const @@ -1012,7 +1012,7 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const if (strcmp(Desc.LanguageCode(), "") == 0) return Desc; return DescriptionList(); -}; +} /*}}}*/ // PrvIterator::IsMultiArchImplicit - added by the cache generation /*{{{*/ -- cgit v1.2.3 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-pkg/pkgcache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/pkgcache.cc') 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; -- cgit v1.2.3 From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- apt-pkg/pkgcache.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 9c14e626e..a19b9571c 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -29,12 +29,15 @@ #include #include #include +#include #include +#include +#include +#include +#include #include #include -#include -#include #include /*}}}*/ -- cgit v1.2.3 From 68134bda8868a8614edf137aad7e9be61cd2a6ee Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 12 Mar 2014 17:55:08 +0100 Subject: abstract version hash comparison a bit In #737085 we see that apt can be confused if informations about versions only differ slightly. This commit adds a way of at least adding a few more data points with the next abi break to help a bit with it. Git-Dch: Ignore --- apt-pkg/pkgcache.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/pkgcache.cc') diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index a19b9571c..91b75f52e 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -55,7 +55,11 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ MajorVersion = 8; +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) + MinorVersion = 2; +#else MinorVersion = 1; +#endif Dirty = false; HeaderSz = sizeof(pkgCache::Header); -- cgit v1.2.3