summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-inst/contrib/extracttar.cc16
-rw-r--r--apt-inst/contrib/extracttar.h5
-rw-r--r--apt-pkg/deb/deblistparser.cc4
-rw-r--r--methods/connect.cc10
4 files changed, 17 insertions, 18 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index c21a336f0..8be61c5ad 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -73,18 +73,18 @@ ExtractTar::ExtractTar(FileFd &Fd,unsigned long long Max,string DecompressionPro
ExtractTar::~ExtractTar()
{
// Error close
- Done(true);
+ Done();
}
/*}}}*/
// ExtractTar::Done - Reap the gzip sub process /*{{{*/
-// ---------------------------------------------------------------------
-/* If the force flag is given then error messages are suppressed - this
- means we hit the end of the tar file but there was still gzip data. */
-bool ExtractTar::Done(bool Force)
+bool ExtractTar::Done(bool)
+{
+ return Done();
+}
+bool ExtractTar::Done()
{
return InFd.Close();
}
-
/*}}}*/
// ExtractTar::StartGzip - Startup gzip /*{{{*/
// ---------------------------------------------------------------------
@@ -151,7 +151,7 @@ bool ExtractTar::Go(pkgDirStream &Stream)
/* Check for a block of nulls - in this case we kill gzip, GNU tar
does this.. */
if (NewSum == ' '*sizeof(Tar->Checksum))
- return Done(true);
+ return Done();
if (NewSum != CheckSum)
return _error->Error(_("Tar checksum failed, archive corrupted"));
@@ -306,6 +306,6 @@ bool ExtractTar::Go(pkgDirStream &Stream)
LastLongLink.erase();
}
- return Done(false);
+ return Done();
}
/*}}}*/
diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h
index 22bb69e66..871946edb 100644
--- a/apt-inst/contrib/extracttar.h
+++ b/apt-inst/contrib/extracttar.h
@@ -48,8 +48,9 @@ class ExtractTar
// Fork and reap gzip
bool StartGzip();
- bool Done(bool Force);
-
+ bool Done();
+ APT_DEPRECATED bool Done(bool Force); // Force is ignored – and the default behaviour
+
public:
bool Go(pkgDirStream &Stream);
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index d88e25e6f..7da908d75 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -371,8 +371,8 @@ unsigned short debListParser::VersionHash()
status = not-installed, config-files, half-installed, unpacked,
half-configured, triggers-awaited, triggers-pending, installed
*/
-bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
- pkgCache::VerIterator &Ver)
+bool debListParser::ParseStatus(pkgCache::PkgIterator &,
+ pkgCache::VerIterator &)
{
return true;
}
diff --git a/methods/connect.cc b/methods/connect.cc
index dd45e7203..171622fa5 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -45,7 +45,6 @@ static struct addrinfo *LastHostAddr = 0;
static struct addrinfo *LastUsed = 0;
static std::vector<SrvRec> SrvRecords;
-static int LastSrvRecord = 0;
// Set of IP/hostnames that we timed out before or couldn't resolve
static std::set<std::string> bad_addr;
@@ -134,11 +133,10 @@ static bool DoConnect(struct addrinfo *Addr,std::string Host,
return true;
}
/*}}}*/
-
-// Connect to a given Hostname
-bool ConnectToHostname(std::string Host,int Port,const char *Service,
- int DefPort,int &Fd,
- unsigned long TimeOut,pkgAcqMethod *Owner)
+// Connect to a given Hostname /*{{{*/
+static bool ConnectToHostname(std::string const &Host, int const Port,
+ const char * const Service, int DefPort, int &Fd,
+ unsigned long const TimeOut, pkgAcqMethod * const Owner)
{
// Convert the port name/number
char ServStr[300];