]> git.saurik.com Git - apt.git/commitdiff
fix some unused parameter/variable warnings
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 31 Aug 2015 15:48:54 +0000 (17:48 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 31 Aug 2015 15:48:54 +0000 (17:48 +0200)
Reported-By: gcc
Git-Dch: Ignore

apt-inst/contrib/extracttar.cc
apt-inst/contrib/extracttar.h
apt-pkg/deb/deblistparser.cc
methods/connect.cc

index c21a336f0e1e4bd6cfdf2fa43ede8cd994416373..8be61c5add758cda5ef70d3f01e0ebebaefb6647 100644 (file)
@@ -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();
 }
                                                                        /*}}}*/
index 22bb69e66af108c9476457d2442ccaa5f11d3914..871946edb51dbd39098d714c8b84f8b39f1b8b5d 100644 (file)
@@ -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);
index d88e25e6fbd10d469528d0012e446f977e9d77a6..7da908d751e4a73350d0d0441241a4adf9cd1432 100644 (file)
@@ -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;
 }
index dd45e7203553e29e8b55774dc39af79dafca5b42..171622fa570d31a2813dd2f5be4d4ee259e45f2e 100644 (file)
@@ -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];