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/policy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/policy.cc') 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] == '#') -- 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/policy.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'apt-pkg/policy.cc') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 2176f1f42..ae30b6f50 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -33,7 +33,15 @@ #include #include #include - +#include +#include +#include + +#include +#include +#include +#include +#include #include #include -- cgit v1.2.3 From a02db58fd50ef7fc2f0284852c6b3f98e458a232 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 6 Mar 2014 00:33:10 +0100 Subject: follow method attribute suggestions by gcc Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn} --- apt-pkg/policy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/policy.cc') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index ae30b6f50..3cfc32829 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -333,7 +333,7 @@ pkgCache::VerIterator pkgPolicy::GetMatch(pkgCache::PkgIterator const &Pkg) // Policy::GetPriority - Get the priority of the package pin /*{{{*/ // --------------------------------------------------------------------- /* */ -signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg) +APT_PURE signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg) { if (Pins[Pkg->ID].Type != pkgVersionMatch::None) { @@ -345,7 +345,7 @@ signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg) return 0; } -signed short pkgPolicy::GetPriority(pkgCache::PkgFileIterator const &File) +APT_PURE signed short pkgPolicy::GetPriority(pkgCache::PkgFileIterator const &File) { return PFPriority[File->ID]; } -- cgit v1.2.3