Explorar o código

fix some unused parameter/variable warnings

Reported-By: gcc
Git-Dch: Ignore
David Kalnischkies %!s(int64=11) %!d(string=hai) anos
pai
achega
b830f576a8

+ 8 - 8
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();
 }
 									/*}}}*/

+ 3 - 2
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);

+ 2 - 2
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;
 }

+ 4 - 6
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];