From ce7f128c020e1347f91c6074238fc5da58c5df71 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 25 Feb 2014 14:26:18 +0100 Subject: support DEB_BUILD_PROFILES and -P for build profiles Inspired by the rest of the patch in 661537, but abstract the parsing of various ways of setting the build profiles more so it can potentially be reused and all apt parts have the same behaviour. Especially config options, cmdline options and environment will not be combined as proposed as this isn't APTs usual behaviour and dpkg doesn't do it either, so one overrides the other as it normally does. --- apt-private/private-cmndline.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-private') diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index ef7d65f3c..b99443210 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -141,6 +141,7 @@ bool addArgumentsAPTGet(std::vector &Args, char const * const { addArg('b', "compile", "APT::Get::Compile", 0); addArg('b', "build", "APT::Get::Compile", 0); + addArg('P', "build-profiles", "APT::Build-Profiles", CommandLine::HasArg); addArg(0, "diff-only", "APT::Get::Diff-Only", 0); addArg(0, "debian-only", "APT::Get::Diff-Only", 0); addArg(0, "tar-only", "APT::Get::Tar-Only", 0); @@ -149,6 +150,7 @@ bool addArgumentsAPTGet(std::vector &Args, char const * const else if (CmdMatches("build-dep")) { addArg('a', "host-architecture", "APT::Get::Host-Architecture", CommandLine::HasArg); + addArg('P', "build-profiles", "APT::Build-Profiles", CommandLine::HasArg); addArg(0, "purge", "APT::Get::Purge", 0); addArg(0, "solver", "APT::Solver", CommandLine::HasArg); // this has no effect *but* sbuild is using it (see LP: #1255806) -- cgit v1.2.3 From 67c3067f1a615fd6ff0b332c2a526d052442913d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 25 Feb 2014 22:22:41 +0100 Subject: fix -Wmissing-field-initializers warnings Reported-By: gcc Git-Dch: Ignore --- apt-private/private-show.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 60d951316..9e4bbd35e 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -96,23 +96,23 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V, // FIXME: add verbose that does not do the removal of the tags? TFRewriteData RW[] = { // delete, apt-cache show has this info and most users do not care - {"MD5sum", 0}, - {"SHA1", 0}, - {"SHA256", 0}, - {"Filename", 0}, - {"Multi-Arch", 0}, - {"Architecture", 0}, - {"Conffiles",0}, + {"MD5sum", NULL, NULL}, + {"SHA1", NULL, NULL}, + {"SHA256", NULL, NULL}, + {"Filename", NULL, NULL}, + {"Multi-Arch", NULL, NULL}, + {"Architecture", NULL, NULL}, + {"Conffiles", NULL, NULL}, // we use the translated description - {"Description",0}, - {"Description-md5",0}, + {"Description", NULL, NULL}, + {"Description-md5", NULL, NULL}, // improve - {"Installed-Size", installed_size.c_str(), 0}, + {"Installed-Size", installed_size.c_str(), NULL}, {"Size", package_size.c_str(), "Download-Size"}, // add - {"APT-Manual-Installed", manual_installed, 0}, - {"APT-Sources", source_index_file.c_str(), 0}, - {} + {"APT-Manual-Installed", manual_installed, NULL}, + {"APT-Sources", source_index_file.c_str(), NULL}, + {NULL, NULL, NULL} }; if(TFRewrite(stdout, Tags, NULL, RW) == false) -- cgit v1.2.3 From 6298ff8b6492e2071a8f2ca7669a3aeef0fb29c7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 25 Feb 2014 22:30:39 +0100 Subject: fix -Wformat= warnings about size_t != %lu on e.g. armel Git-Dch: Ignore Reported-By: gcc --- apt-private/private-show.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 9e4bbd35e..0a69debbf 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -148,8 +148,9 @@ bool ShowPackage(CommandLine &CmdL) /*{{{*/ if (select == APT::VersionList::CANDIDATE) { APT::VersionList const verset_all = APT::VersionList::FromCommandLine(CacheFile, CmdL.FileList + 1, APT::VersionList::ALL, helper); - if (verset_all.size() > verset.size()) - _error->Notice(ngettext("There is %lu additional record. Please use the '-a' switch to see it", "There are %lu additional records. Please use the '-a' switch to see them.", verset_all.size() - verset.size()), verset_all.size() - verset.size()); + int const records = verset_all.size() - verset.size(); + if (records > 0) + _error->Notice(P_("There is %i additional record. Please use the '-a' switch to see it", "There are %i additional records. Please use the '-a' switch to see them.", records), records); } for (APT::PackageSet::const_iterator Pkg = helper.virtualPkgs.begin(); -- cgit v1.2.3 From 27511c011f9ade22e90e90e7acbeb87ba7324a19 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 27 Feb 2014 00:56:11 +0100 Subject: warning: non-ISO-standard escape sequence, '\e' [enabled by default] Git-Dch: Ignore Reported-By: gcc -Wpedantic --- apt-private/private-moo.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-moo.cc b/apt-private/private-moo.cc index 9b5b94654..23255db6f 100644 --- a/apt-private/private-moo.cc +++ b/apt-private/private-moo.cc @@ -102,16 +102,16 @@ bool DoMoo2(CommandLine &CmdL) /*{{{*/ else { c1out << - OutputInDepth(depth, " ") << " \e[1;97m(\e[0;33m__\e[1;97m)\e[0m\n" << - OutputInDepth(depth, " ") << " \e[31m_______\e[33m~(\e[1;34m..\e[0;33m)~\e[0m\n" << - OutputInDepth(depth, " ") << " \e[33m,----\e[31m\\\e[33m(\e[1;4;35moo\e[0;33m)\e[0m\n" << - OutputInDepth(depth, " ") << " \e[33m/|____|,'\e[0m\n" << - OutputInDepth(depth, " ") << " \e[1;5;97m*\e[0;33m /\\ /\\\e[0m\n" << - "\e[32m"; + OutputInDepth(depth, " ") << " \033[1;97m(\033[0;33m__\033[1;97m)\033[0m\n" << + OutputInDepth(depth, " ") << " \033[31m_______\033[33m~(\033[1;34m..\033[0;33m)~\033[0m\n" << + OutputInDepth(depth, " ") << " \033[33m,----\033[31m\\\033[33m(\033[1;4;35moo\033[0;33m)\033[0m\n" << + OutputInDepth(depth, " ") << " \033[33m/|____|,'\033[0m\n" << + OutputInDepth(depth, " ") << " \033[1;5;97m*\033[0;33m /\\ /\\\033[0m\n" << + "\033[32m"; for (size_t i = moo.length()/2; i > 1; --i) c1out << "wW"; - c1out << "w\e[0m\n" << moo; + c1out << "w\033[0m\n" << moo; } return true; -- cgit v1.2.3 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-private/acqprogress.cc | 62 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'apt-private') diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc index d25ffef75..66e1600f1 100644 --- a/apt-private/acqprogress.cc +++ b/apt-private/acqprogress.cc @@ -42,12 +42,12 @@ AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int const Quiet) // AcqTextStatus::Start - Downloading has started /*{{{*/ // --------------------------------------------------------------------- /* */ -void AcqTextStatus::Start() +void AcqTextStatus::Start() { - pkgAcquireStatus::Start(); + pkgAcquireStatus::Start(); BlankLine[0] = 0; ID = 1; -}; +} /*}}}*/ // AcqTextStatus::IMSHit - Called when an item got a HIT response /*{{{*/ // --------------------------------------------------------------------- @@ -58,14 +58,14 @@ void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm) return; if (Quiet <= 0) - cout << '\r' << BlankLine << '\r'; - + cout << '\r' << BlankLine << '\r'; + cout << _("Hit ") << Itm.Description; if (Itm.Owner->FileSize != 0) cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]"; cout << endl; Update = true; -}; +} /*}}}*/ // AcqTextStatus::Fetch - An item has started to download /*{{{*/ // --------------------------------------------------------------------- @@ -75,20 +75,20 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm) Update = true; if (Itm.Owner->Complete == true) return; - + Itm.Owner->ID = ID++; - + if (Quiet > 1) return; if (Quiet <= 0) cout << '\r' << BlankLine << '\r'; - + cout << _("Get:") << Itm.Owner->ID << ' ' << Itm.Description; if (Itm.Owner->FileSize != 0) cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]"; cout << endl; -}; +} /*}}}*/ // AcqTextStatus::Done - Completed a download /*{{{*/ // --------------------------------------------------------------------- @@ -96,7 +96,7 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm) void AcqTextStatus::Done(pkgAcquire::ItemDesc &Itm) { Update = true; -}; +} /*}}}*/ // AcqTextStatus::Fail - Called when an item fails to download /*{{{*/ // --------------------------------------------------------------------- @@ -109,10 +109,10 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm) // Ignore certain kinds of transient failures (bad code) if (Itm.Owner->Status == pkgAcquire::Item::StatIdle) return; - + if (Quiet <= 0) cout << '\r' << BlankLine << '\r'; - + if (Itm.Owner->Status == pkgAcquire::Item::StatDone) { cout << _("Ign ") << Itm.Description << endl; @@ -122,9 +122,9 @@ void AcqTextStatus::Fail(pkgAcquire::ItemDesc &Itm) cout << _("Err ") << Itm.Description << endl; cout << " " << Itm.Owner->ErrorText << endl; } - + Update = true; -}; +} /*}}}*/ // AcqTextStatus::Stop - Finished downloading /*{{{*/ // --------------------------------------------------------------------- @@ -154,12 +154,12 @@ void AcqTextStatus::Stop() bool AcqTextStatus::Pulse(pkgAcquire *Owner) { pkgAcquireStatus::Pulse(Owner); - + if (Quiet > 0) return true; - + enum {Long = 0,Medium,Short} Mode = Medium; - + char Buffer[sizeof(BlankLine)]; char *End = Buffer + sizeof(Buffer); char *S = Buffer; @@ -174,8 +174,8 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) I = Owner->WorkerStep(I)) { S += strlen(S); - - // There is no item running + + // There is no item running if (I->CurrentItem == 0) { if (I->Status.empty() == false) @@ -183,12 +183,12 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) snprintf(S,End-S," [%s]",I->Status.c_str()); Shown = true; } - + continue; } Shown = true; - + // Add in the short description if (I->CurrentItem->Owner->ID != 0) snprintf(S,End-S," [%lu %s",I->CurrentItem->Owner->ID, @@ -203,7 +203,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) snprintf(S,End-S," %s",I->CurrentItem->Owner->Mode); S += strlen(S); } - + // Add the current progress if (Mode == Long) snprintf(S,End-S," %llu",I->CurrentSize); @@ -213,7 +213,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) snprintf(S,End-S," %sB",SizeToStr(I->CurrentSize).c_str()); } S += strlen(S); - + // Add the total size and percent if (I->TotalSize > 0 && I->CurrentItem->Owner->Complete == false) { @@ -223,7 +223,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) else snprintf(S,End-S,"/%sB %.0f%%",SizeToStr(I->TotalSize).c_str(), (I->CurrentSize*100.0)/I->TotalSize); - } + } S += strlen(S); snprintf(S,End-S,"]"); } @@ -231,26 +231,26 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) // Show something.. if (Shown == false) snprintf(S,End-S,_(" [Working]")); - + /* Put in the ETA and cps meter, block off signals to prevent strangeness during resizing */ sigset_t Sigs,OldSigs; sigemptyset(&Sigs); sigaddset(&Sigs,SIGWINCH); sigprocmask(SIG_BLOCK,&Sigs,&OldSigs); - + if (CurrentCPS != 0) - { + { char Tmp[300]; unsigned long long ETA = (TotalBytes - CurrentBytes)/CurrentCPS; sprintf(Tmp," %sB/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str()); unsigned int Len = strlen(Buffer); unsigned int LenT = strlen(Tmp); if (Len + LenT < ScreenWidth) - { + { memset(Buffer + Len,' ',ScreenWidth - Len); strcpy(Buffer + ScreenWidth - LenT,Tmp); - } + } } Buffer[ScreenWidth] = 0; BlankLine[ScreenWidth] = 0; @@ -268,7 +268,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) memset(BlankLine,' ',strlen(Buffer)); BlankLine[strlen(Buffer)] = 0; - + Update = false; return true; -- cgit v1.2.3 From c3ccac9232c2684b15f75fa8622a9a290aeca123 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 27 Feb 2014 03:11:54 +0100 Subject: warning: no previous declaration for foobar() [-Wmissing-declarations] Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations --- apt-private/private-cmndline.cc | 14 +++++++------- apt-private/private-download.cc | 1 + apt-private/private-install.cc | 2 +- apt-private/private-list.cc | 2 +- apt-private/private-moo.cc | 4 ++-- apt-private/private-output.cc | 16 ++++++++-------- apt-private/private-show.cc | 3 ++- apt-private/private-update.cc | 1 + 8 files changed, 23 insertions(+), 20 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index b99443210..132da04d5 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -14,7 +14,7 @@ #include /*}}}*/ -bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/ +static bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/ { va_list args; bool found = false; @@ -33,7 +33,7 @@ bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/ /*}}}*/ #define addArg(w,x,y,z) Args.push_back(CommandLine::MakeArgs(w,x,y,z)) #define CmdMatches(...) strcmp_match_in_list(Cmd, __VA_ARGS__, NULL) -bool addArgumentsAPTCache(std::vector &Args, char const * const Cmd)/*{{{*/ +static bool addArgumentsAPTCache(std::vector &Args, char const * const Cmd)/*{{{*/ { if (CmdMatches("depends", "rdepends", "xvcg", "dotty")) { @@ -82,7 +82,7 @@ bool addArgumentsAPTCache(std::vector &Args, char const * con return true; } /*}}}*/ -bool addArgumentsAPTCDROM(std::vector &Args, char const * const Cmd)/*{{{*/ +static bool addArgumentsAPTCDROM(std::vector &Args, char const * const Cmd)/*{{{*/ { if (CmdMatches("add", "ident") == false) return false; @@ -100,7 +100,7 @@ bool addArgumentsAPTCDROM(std::vector &Args, char const * con return true; } /*}}}*/ -bool addArgumentsAPTConfig(std::vector &Args, char const * const Cmd)/*{{{*/ +static bool addArgumentsAPTConfig(std::vector &Args, char const * const Cmd)/*{{{*/ { if (CmdMatches("dump")) { @@ -115,7 +115,7 @@ bool addArgumentsAPTConfig(std::vector &Args, char const * co return true; } /*}}}*/ -bool addArgumentsAPTGet(std::vector &Args, char const * const Cmd)/*{{{*/ +static bool addArgumentsAPTGet(std::vector &Args, char const * const Cmd)/*{{{*/ { if (CmdMatches("install", "remove", "purge", "upgrade", "dist-upgrade", "dselect-upgrade", "autoremove")) @@ -202,7 +202,7 @@ bool addArgumentsAPTGet(std::vector &Args, char const * const return true; } /*}}}*/ -bool addArgumentsAPTMark(std::vector &Args, char const * const Cmd)/*{{{*/ +static bool addArgumentsAPTMark(std::vector &Args, char const * const Cmd)/*{{{*/ { if (CmdMatches("auto", "manual", "hold", "unhold", "showauto", "showmanual", "showhold", "showholds", "install", @@ -222,7 +222,7 @@ bool addArgumentsAPTMark(std::vector &Args, char const * cons return true; } /*}}}*/ -bool addArgumentsAPT(std::vector &Args, char const * const Cmd)/*{{{*/ +static bool addArgumentsAPT(std::vector &Args, char const * const Cmd)/*{{{*/ { if (CmdMatches("list")) { diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc index f02991cde..80795f964 100644 --- a/apt-private/private-download.cc +++ b/apt-private/private-download.cc @@ -8,6 +8,7 @@ #include #include "private-output.h" +#include "private-download.h" #include diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 3adb00b23..ff609f567 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -386,7 +386,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) // DoAutomaticRemove - Remove all automatic unused packages /*{{{*/ // --------------------------------------------------------------------- /* Remove unused automatic packages */ -bool DoAutomaticRemove(CacheFile &Cache) +static bool DoAutomaticRemove(CacheFile &Cache) { bool Debug = _config->FindI("Debug::pkgAutoRemove",false); bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false); diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index 44a766c84..bc4539aeb 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -99,7 +99,7 @@ private: #undef PackageMatcher }; /*}}}*/ -void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ +static void ListAllVersions(pkgCacheFile &CacheFile, pkgRecords &records,/*{{{*/ pkgCache::PkgIterator P, std::ostream &outs, bool include_summary=true) diff --git a/apt-private/private-moo.cc b/apt-private/private-moo.cc index 23255db6f..5d247041d 100644 --- a/apt-private/private-moo.cc +++ b/apt-private/private-moo.cc @@ -22,7 +22,7 @@ #include /*}}}*/ -std::string getMooLine() { /*{{{*/ +static std::string getMooLine() { /*{{{*/ time_t const timenow = time(NULL); struct tm special; localtime_r(&timenow, &special); @@ -60,7 +60,7 @@ std::string getMooLine() { /*{{{*/ return out.str(); } /*}}}*/ -bool printMooLine() { /*{{{*/ +static bool printMooLine() { /*{{{*/ std::cerr << getMooLine() << std::endl; return true; } diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc index 420ca14d5..dec518392 100644 --- a/apt-private/private-output.cc +++ b/apt-private/private-output.cc @@ -63,7 +63,7 @@ bool InitOutput() /*{{{*/ return true; } /*}}}*/ -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()) @@ -82,7 +82,7 @@ std::string GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver) return suite; } /*}}}*/ -std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ +static std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ { pkgDepCache *DepCache = CacheFile.GetDepCache(); pkgDepCache::StateCache &state = (*DepCache)[P]; @@ -99,7 +99,7 @@ std::string GetFlagsStr(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ return flags_str; } /*}}}*/ -std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ +static std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ { pkgPolicy *policy = CacheFile.GetPolicy(); pkgCache::VerIterator cand = policy->GetCandidateVer(P); @@ -107,14 +107,14 @@ std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P return cand ? cand.VerStr() : "(none)"; } /*}}}*/ -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)"; } /*}}}*/ -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()) @@ -134,16 +134,16 @@ std::string GetVersion(pkgCacheFile &CacheFile, pkgCache::VerIterator V)/*{{{*/ return "(none)"; } /*}}}*/ -std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ +static std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)/*{{{*/ { pkgPolicy *policy = CacheFile.GetPolicy(); pkgCache::VerIterator inst = P.CurrentVer(); pkgCache::VerIterator cand = policy->GetCandidateVer(P); - + return inst ? inst.Arch() : cand.Arch(); } /*}}}*/ -std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P)/*{{{*/ +static std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pkgCache::PkgIterator P)/*{{{*/ { pkgPolicy *policy = CacheFile.GetPolicy(); diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 0a69debbf..94f944af1 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -24,6 +24,7 @@ #include "private-output.h" #include "private-cacheset.h" +#include "private-show.h" /*}}}*/ namespace APT { @@ -31,7 +32,7 @@ namespace APT { // DisplayRecord - Displays the complete record for the package /*{{{*/ // --------------------------------------------------------------------- -bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V, +static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V, ostream &out) { pkgCache *Cache = CacheFile.GetPkgCache(); diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc index f6c12c26a..1f6fb6f79 100644 --- a/apt-private/private-update.cc +++ b/apt-private/private-update.cc @@ -31,6 +31,7 @@ #include "private-cachefile.h" #include "private-output.h" +#include "private-update.h" #include "acqprogress.h" #include -- 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-private/acqprogress.cc | 2 +- apt-private/private-cacheset.h | 8 ++++---- apt-private/private-moo.cc | 8 ++++---- apt-private/private-output.cc | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'apt-private') 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()) -- 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-private/acqprogress.cc | 5 ++- apt-private/private-cachefile.cc | 12 +++++-- apt-private/private-cachefile.h | 2 ++ apt-private/private-cacheset.cc | 13 ++++++-- apt-private/private-cacheset.h | 15 +++++++++ apt-private/private-cmndline.cc | 6 ++-- apt-private/private-download.cc | 6 ++-- apt-private/private-download.h | 2 +- apt-private/private-install.cc | 68 +++++++++++++++++----------------------- apt-private/private-install.h | 18 +++++++++-- apt-private/private-list.cc | 43 +++++++++---------------- apt-private/private-list.h | 2 +- apt-private/private-main.cc | 12 ++++--- apt-private/private-main.h | 3 +- apt-private/private-moo.cc | 12 ++++--- apt-private/private-output.cc | 14 ++++++--- apt-private/private-output.h | 5 +-- apt-private/private-search.cc | 44 ++++++++++---------------- apt-private/private-search.h | 2 +- apt-private/private-show.cc | 40 ++++++++++++----------- apt-private/private-show.h | 2 +- apt-private/private-sources.cc | 21 ++++++++++--- apt-private/private-sources.h | 7 ++++- apt-private/private-update.cc | 39 +++++++---------------- apt-private/private-upgrade.cc | 18 +++++++---- apt-private/private-upgrade.h | 4 +-- apt-private/private-utils.cc | 8 +++-- apt-private/private-utils.h | 2 -- 28 files changed, 226 insertions(+), 199 deletions(-) (limited to 'apt-private') diff --git a/apt-private/acqprogress.cc b/apt-private/acqprogress.cc index d08ed072f..fe7a45e12 100644 --- a/apt-private/acqprogress.cc +++ b/apt-private/acqprogress.cc @@ -10,18 +10,21 @@ // Include files /*{{{*/ #include +#include #include #include #include #include #include +#include + +#include #include #include #include #include -#include "acqprogress.h" #include /*}}}*/ diff --git a/apt-private/private-cachefile.cc b/apt-private/private-cachefile.cc index c822b9bad..5e955ac39 100644 --- a/apt-private/private-cachefile.cc +++ b/apt-private/private-cachefile.cc @@ -4,11 +4,17 @@ #include #include #include +#include +#include +#include +#include -#include +#include +#include -#include "private-output.h" -#include "private-cachefile.h" +#include +#include +#include #include /*}}}*/ diff --git a/apt-private/private-cachefile.h b/apt-private/private-cachefile.h index f24d93020..94d93df2c 100644 --- a/apt-private/private-cachefile.h +++ b/apt-private/private-cachefile.h @@ -3,6 +3,8 @@ #include #include +#include +#include // class CacheFile - Cover class for some dependency cache functions /*{{{*/ diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc index a7dc0e800..4a63c7e81 100644 --- a/apt-private/private-cacheset.cc +++ b/apt-private/private-cacheset.cc @@ -1,9 +1,18 @@ +#include + #include #include #include -#include +#include +#include +#include +#include + +#include + +#include -#include "private-cacheset.h" +#include bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile, LocalitySortedVersionSet &output_set, diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h index 26c7f1ac2..854d16922 100644 --- a/apt-private/private-cacheset.h +++ b/apt-private/private-cacheset.h @@ -1,17 +1,32 @@ #ifndef APT_PRIVATE_CACHESET_H #define APT_PRIVATE_CACHESET_H +#include #include #include #include +#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include #include "private-output.h" #include +class OpProgress; + struct VersionSortDescriptionLocality { bool operator () (const pkgCache::VerIterator &v_lhs, diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 132da04d5..2b2a35637 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -2,15 +2,13 @@ #include #include -#include -#include +#include +#include #include #include -#include "private-cmndline.h" - #include /*}}}*/ diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc index 80795f964..a095f0c67 100644 --- a/apt-private/private-download.cc +++ b/apt-private/private-download.cc @@ -7,10 +7,8 @@ #include #include -#include "private-output.h" -#include "private-download.h" - -#include +#include +#include #include #include diff --git a/apt-private/private-download.h b/apt-private/private-download.h index b8cc8da1e..1447845ed 100644 --- a/apt-private/private-download.h +++ b/apt-private/private-download.h @@ -1,7 +1,7 @@ #ifndef APT_PRIVATE_DOWNLOAD_H #define APT_PRIVATE_DOWNLOAD_H -#include +class pkgAcquire; bool CheckAuth(pkgAcquire& Fetcher, bool const PromptUser); bool AcquireRun(pkgAcquire &Fetcher, int const PulseInterval, bool * const Failure, bool * const TransientNetworkFailure); diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index ff609f567..8092af939 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -1,57 +1,45 @@ // Include Files /*{{{*/ #include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include -#include "private-install.h" -#include "private-download.h" -#include "private-cachefile.h" -#include "private-output.h" -#include "private-cacheset.h" -#include "acqprogress.h" +#include +#include +#include +#include +#include +#include #include /*}}}*/ +class pkgSourceList; // InstallPackages - Actually download and install the packages /*{{{*/ // --------------------------------------------------------------------- diff --git a/apt-private/private-install.h b/apt-private/private-install.h index 2187146d3..79769d470 100644 --- a/apt-private/private-install.h +++ b/apt-private/private-install.h @@ -1,15 +1,29 @@ #ifndef APT_PRIVATE_INSTALL_H #define APT_PRIVATE_INSTALL_H +#include +#include +#include +#include +#include #include -#include #include +#include + +#include +#include +#include +#include +#include +#include -#include "private-cachefile.h" #include "private-output.h" #include +class CacheFile; +class CommandLine; + #define RAMFS_MAGIC 0x858458f6 bool DoInstall(CommandLine &Cmd); diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index bc4539aeb..7664ca134 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -1,43 +1,28 @@ // Include Files /*{{{*/ #include -#include #include #include #include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include #include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "private-cmndline.h" -#include "private-list.h" -#include "private-output.h" -#include "private-cacheset.h" +#include #include /*}}}*/ diff --git a/apt-private/private-list.h b/apt-private/private-list.h index 6f5aad27a..749744dd1 100644 --- a/apt-private/private-list.h +++ b/apt-private/private-list.h @@ -1,7 +1,7 @@ #ifndef APT_PRIVATE_LIST_H #define APT_PRIVATE_LIST_H -#include +class CommandLine; bool List(CommandLine &Cmd); diff --git a/apt-private/private-main.cc b/apt-private/private-main.cc index 1fdf3f0be..2d3965172 100644 --- a/apt-private/private-main.cc +++ b/apt-private/private-main.cc @@ -1,9 +1,13 @@ +#include -#include -#include - +#include #include -#include "private-main.h" + +#include + +#include +#include +#include #include diff --git a/apt-private/private-main.h b/apt-private/private-main.h index f9a95c4ec..257c51a0b 100644 --- a/apt-private/private-main.h +++ b/apt-private/private-main.h @@ -1,9 +1,8 @@ #ifndef APT_PRIVATE_MAIN_H #define APT_PRIVATE_MAIN_H -#include +class CommandLine; void CheckSimulateMode(CommandLine &CmdL); - #endif diff --git a/apt-private/private-moo.cc b/apt-private/private-moo.cc index 9c4f6bf15..a87999150 100644 --- a/apt-private/private-moo.cc +++ b/apt-private/private-moo.cc @@ -13,11 +13,15 @@ #include #include -#include -#include +#include +#include -#include "private-moo.h" -#include "private-output.h" +#include +#include +#include +#include +#include +#include #include /*}}}*/ diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc index 52f65d794..bbd8545ad 100644 --- a/apt-private/private-output.cc +++ b/apt-private/private-output.cc @@ -7,16 +7,22 @@ #include #include #include +#include +#include +#include +#include +#include + +#include +#include +#include +#include #include #include -#include #include #include -#include "private-output.h" -#include "private-cachefile.h" - #include /*}}}*/ diff --git a/apt-private/private-output.h b/apt-private/private-output.h index 2a2a69458..81643f90a 100644 --- a/apt-private/private-output.h +++ b/apt-private/private-output.h @@ -1,17 +1,14 @@ #ifndef APT_PRIVATE_OUTPUT_H #define APT_PRIVATE_OUTPUT_H +#include -#include #include #include -#include "private-cachefile.h" - // forward declaration class pkgCacheFile; class CacheFile; -class pkgCache; class pkgDepCache; class pkgRecords; diff --git a/apt-private/private-search.cc b/apt-private/private-search.cc index 0b1a929b0..8106333b6 100644 --- a/apt-private/private-search.cc +++ b/apt-private/private-search.cc @@ -1,40 +1,30 @@ // Includes /*{{{*/ -#include +#include + #include -#include #include -#include -#include -#include #include -#include -#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -#include -#include -#include -#include +#include +#include +#include + +#include #include -#include -#include -#include -#include -#include -#include +#include #include +#include +#include -#include "private-search.h" -#include "private-cacheset.h" +#include /*}}}*/ bool FullTextSearch(CommandLine &CmdL) /*{{{*/ diff --git a/apt-private/private-search.h b/apt-private/private-search.h index 17faffebc..539915f1f 100644 --- a/apt-private/private-search.h +++ b/apt-private/private-search.h @@ -1,7 +1,7 @@ #ifndef APT_PRIVATE_SEARCH_H #define APT_PRIVATE_SEARCH_H -#include +class CommandLine; bool FullTextSearch(CommandLine &CmdL); diff --git a/apt-private/private-show.cc b/apt-private/private-show.cc index 94f944af1..8ae6a6dac 100644 --- a/apt-private/private-show.cc +++ b/apt-private/private-show.cc @@ -1,30 +1,32 @@ // Includes /*{{{*/ -#include +#include + #include -#include #include -#include -#include -#include #include -#include +#include #include +#include #include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include -#include +#include +#include +#include + +#include +#include +#include -#include "private-output.h" -#include "private-cacheset.h" -#include "private-show.h" +#include /*}}}*/ namespace APT { @@ -33,7 +35,7 @@ namespace APT { // DisplayRecord - Displays the complete record for the package /*{{{*/ // --------------------------------------------------------------------- static bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V, - ostream &out) + std::ostream &out) { pkgCache *Cache = CacheFile.GetPkgCache(); if (unlikely(Cache == NULL)) diff --git a/apt-private/private-show.h b/apt-private/private-show.h index b428c7af0..a15367e28 100644 --- a/apt-private/private-show.h +++ b/apt-private/private-show.h @@ -1,7 +1,7 @@ #ifndef APT_PRIVATE_SHOW_H #define APT_PRIVATE_SHOW_H -#include +class CommandLine; namespace APT { namespace Cmd { diff --git a/apt-private/private-sources.cc b/apt-private/private-sources.cc index 41cf6b313..301936b9d 100644 --- a/apt-private/private-sources.cc +++ b/apt-private/private-sources.cc @@ -1,10 +1,23 @@ +#include #include -#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include -#include "private-output.h" -#include "private-sources.h" -#include "private-utils.h" +#include +#include +#include +#include + +#include /* Interface discussion with donkult (for the future): apt [add-{archive,release,component}|edit|change-release|disable]-sources diff --git a/apt-private/private-sources.h b/apt-private/private-sources.h index b394622be..4c58af180 100644 --- a/apt-private/private-sources.h +++ b/apt-private/private-sources.h @@ -1,3 +1,8 @@ -#include +#ifndef APT_PRIVATE_SOURCES_H +#define APT_PRIVATE_SOURCES_H + +class CommandLine; bool EditSources(CommandLine &CmdL); + +#endif diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc index 1f6fb6f79..da83d7741 100644 --- a/apt-private/private-update.cc +++ b/apt-private/private-update.cc @@ -1,38 +1,23 @@ // Include files /*{{{*/ #include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include #include +#include +#include -#include -#include -#include +#include +#include +#include +#include -#include "private-cachefile.h" -#include "private-output.h" -#include "private-update.h" -#include "acqprogress.h" +#include +#include #include /*}}}*/ diff --git a/apt-private/private-upgrade.cc b/apt-private/private-upgrade.cc index a97e6d25b..68b2c5e00 100644 --- a/apt-private/private-upgrade.cc +++ b/apt-private/private-upgrade.cc @@ -1,12 +1,18 @@ - // Includes /*{{{*/ -#include +#include + #include +#include +#include + +#include +#include +#include +#include + #include -#include "private-install.h" -#include "private-cachefile.h" -#include "private-upgrade.h" -#include "private-output.h" + +#include /*}}}*/ // this is actually performing the various upgrade operations diff --git a/apt-private/private-upgrade.h b/apt-private/private-upgrade.h index 5efc66bf7..64c4c0874 100644 --- a/apt-private/private-upgrade.h +++ b/apt-private/private-upgrade.h @@ -1,13 +1,11 @@ #ifndef APTPRIVATE_PRIVATE_UPGRADE_H #define APTPRIVATE_PRIVATE_UPGRADE_H -#include - +class CommandLine; bool DoDistUpgrade(CommandLine &CmdL); bool DoUpgrade(CommandLine &CmdL); bool DoUpgradeNoNewPackages(CommandLine &CmdL); bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL); - #endif diff --git a/apt-private/private-utils.cc b/apt-private/private-utils.cc index 813f19329..9547a1b75 100644 --- a/apt-private/private-utils.cc +++ b/apt-private/private-utils.cc @@ -1,9 +1,12 @@ -#include +#include #include #include -#include "private-utils.h" +#include + +#include +#include // DisplayFileInPager - Display File with pager /*{{{*/ void DisplayFileInPager(std::string filename) @@ -26,7 +29,6 @@ void DisplayFileInPager(std::string filename) ExecWait(Process, "sensible-pager", false); } /*}}}*/ - // EditFileInSensibleEditor - Edit File with editor /*{{{*/ void EditFileInSensibleEditor(std::string filename) { diff --git a/apt-private/private-utils.h b/apt-private/private-utils.h index 258dd06a8..4bb535e86 100644 --- a/apt-private/private-utils.h +++ b/apt-private/private-utils.h @@ -6,6 +6,4 @@ void DisplayFileInPager(std::string filename); void EditFileInSensibleEditor(std::string filename); - - #endif -- 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-private/private-cachefile.h | 2 +- apt-private/private-cmndline.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-cachefile.h b/apt-private/private-cachefile.h index 94d93df2c..67c5e8cdc 100644 --- a/apt-private/private-cachefile.h +++ b/apt-private/private-cachefile.h @@ -13,7 +13,7 @@ class CacheFile : public pkgCacheFile { static pkgCache *SortCache; - static int NameComp(const void *a,const void *b); + static int NameComp(const void *a,const void *b) APT_PURE; public: pkgCache::Package **List; diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 2b2a35637..682be0a19 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -12,7 +12,7 @@ #include /*}}}*/ -static bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/ +APT_SENTINEL static bool strcmp_match_in_list(char const * const Cmd, ...) /*{{{*/ { va_list args; bool found = false; -- cgit v1.2.3 From 1166ea79889ecd6c88380f7988182647cf787f8f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 10 Mar 2014 02:54:33 +0100 Subject: msgstr with elipses need three dots fixes some messages and their translation so that all of them have three dots for messages with an elipse. Many translations already had this. --- apt-private/private-install.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-private') diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 8092af939..107ed398e 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -144,7 +144,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) if (DebBytes != Cache->DebSize()) { c0out << DebBytes << ',' << Cache->DebSize() << std::endl; - c0out << _("How odd.. The sizes didn't match, email apt@packages.debian.org") << std::endl; + c0out << _("How odd... The sizes didn't match, email apt@packages.debian.org") << std::endl; } // Number of bytes -- cgit v1.2.3