diff --git a/apt-0.5.15lorg2-alt-fixes.patch b/apt-0.5.15lorg2-alt-fixes.patch deleted file mode 100644 index a702d88..0000000 --- a/apt-0.5.15lorg2-alt-fixes.patch +++ /dev/null @@ -1,266 +0,0 @@ -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/acquire-item.cc apt-0.5.15lorg2/apt-pkg/acquire-item.cc ---- apt-0.5.15lorg2.orig/apt-pkg/acquire-item.cc 2006-01-16 23:10:47 +0000 -+++ apt-0.5.15lorg2/apt-pkg/acquire-item.cc 2006-04-01 17:25:00 +0000 -@@ -48,7 +48,7 @@ using std::string; - // --------------------------------------------------------------------- - /* Returns false only if the checksums fail (the file not existing is not - a checksum mismatch) */ --bool VerifyChecksums(string File,unsigned long Size,string MD5) -+static bool VerifyChecksums(string File, unsigned long Size, string MD5) - { - struct stat Buf; - -@@ -283,7 +283,7 @@ void pkgAcqIndex::Done(string Message,un - ErrorText = _("Size mismatch"); - Rename(DestFile,DestFile + ".FAILED"); - if (_config->FindB("Acquire::Verbose",false) == true) -- _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul", -+ _error->Warning("Size mismatch of index file %s: %lu was supposed to be %lu", - RealURI.c_str(), Size, FSize); - return; - } -@@ -559,7 +559,7 @@ void pkgAcqIndexRel::Done(string Message - ErrorText = _("Size mismatch"); - Rename(DestFile,DestFile + ".FAILED"); - if (_config->FindB("Acquire::Verbose",false) == true) -- _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul", -+ _error->Warning("Size mismatch of index file %s: %lu was supposed to be %lu", - RealURI.c_str(), Size, FSize); - return; - } -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/luaiface.h apt-0.5.15lorg2/apt-pkg/luaiface.h ---- apt-0.5.15lorg2.orig/apt-pkg/luaiface.h 2006-01-16 23:10:47 +0000 -+++ apt-0.5.15lorg2/apt-pkg/luaiface.h 2006-04-01 17:19:39 +0000 -@@ -54,8 +54,9 @@ class Lua { - void RunInteractive(const string &PlaceHint) - { RunInteractive(PlaceHint.c_str()); }; - -+ //or all of this RunScript should be void? - bool RunScript(const string &Script, const string &ChunkCacheKey="") -- { RunScript(Script.c_str(), (ChunkCacheKey.length() == 0) ? -+ { return RunScript(Script.c_str(), ChunkCacheKey.empty() ? - NULL : ChunkCacheKey.c_str()); }; - bool RunScript(const char *Script, const char *ChunkCacheKey=NULL); - bool RunScripts(const char *ConfListKey, bool CacheChunks=false); -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/pkgrecords.cc apt-0.5.15lorg2/apt-pkg/pkgrecords.cc ---- apt-0.5.15lorg2.orig/apt-pkg/pkgrecords.cc 2006-01-16 23:10:47 +0000 -+++ apt-0.5.15lorg2/apt-pkg/pkgrecords.cc 2006-04-01 17:19:39 +0000 -@@ -56,7 +56,8 @@ pkgRecords::~pkgRecords() - { - // CNC:2002-11-28 - // See comments above. -- for (unsigned I = 0; I != PackageFileCount; I++) -+ // PackageFileCount is int according to apt-pkg/pkgrecords.h -+ for (int I = 0; I != PackageFileCount; I++) - delete Files[I]; - delete [] Files; - } -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/pkgsystem.h apt-0.5.15lorg2/apt-pkg/pkgsystem.h ---- apt-0.5.15lorg2.orig/apt-pkg/pkgsystem.h 2006-02-06 19:11:06 +0000 -+++ apt-0.5.15lorg2/apt-pkg/pkgsystem.h 2006-04-01 17:19:39 +0000 -@@ -90,7 +90,7 @@ class pkgSystem - // Return a list of system index files.. - virtual bool AddStatusFiles(std::vector &List) = 0; - // CNC:2003-11-21 -- virtual bool AddSourceFiles(std::vector &List) {}; -+ virtual void AddSourceFiles(std::vector &List) {}; - virtual bool FindIndex(pkgCache::PkgFileIterator File, - pkgIndexFile *&Found) const = 0; - -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmhandler.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmhandler.cc ---- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmhandler.cc 2006-02-06 19:11:06 +0000 -+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmhandler.cc 2006-04-01 17:19:39 +0000 -@@ -87,7 +87,7 @@ bool RPMFileHandler::Jump(unsigned Offse - { - if (FD == NULL) - return false; -- if (lseek(Fileno(FD),Offset,SEEK_SET) != Offset) -+ if (lseek(Fileno(FD),Offset,SEEK_SET) != (off_t)Offset) - return false; - return Skip(); - } -@@ -347,7 +347,7 @@ string RPMDirHandler::MD5Sum() - - - RPMDBHandler::RPMDBHandler(bool WriteLock) -- : WriteLock(WriteLock), Handler(0) -+ : Handler(0), WriteLock(WriteLock) - { - #if RPM_VERSION >= 0x040000 - RpmIter = NULL; -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpackagedata.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmpackagedata.cc ---- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpackagedata.cc 2006-02-06 17:21:43 +0000 -+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmpackagedata.cc 2006-04-01 17:22:48 +0000 -@@ -296,7 +296,6 @@ int RPMPackageData::RpmArchScore(const c - - bool RPMPackageData::IsCompatArch(string Arch) - { -- bool compat = false; - for (vector::iterator I = CompatArch[BaseArch].begin(); - I != CompatArch[BaseArch].end(); I++) { - if (Arch == *I) -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpm.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmpm.cc ---- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmpm.cc 2006-01-16 23:10:47 +0000 -+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmpm.cc 2006-04-01 17:19:39 +0000 -@@ -398,7 +398,7 @@ bool pkgRPMExtPM::ExecRPM(Item::RPMOps o - - Args[n++] = _config->Find("Dir::Bin::rpm","rpm").c_str(); - -- bool nodeps; -+ bool nodeps = false; - - switch (op) - { -@@ -421,6 +421,8 @@ bool pkgRPMExtPM::ExecRPM(Item::RPMOps o - operation = "-e"; - nodeps = true; - break; -+ default: -+ return false; - } - Args[n++] = operation; - -@@ -662,8 +664,7 @@ pkgRPMLibPM::~pkgRPMLibPM() - - bool pkgRPMLibPM::AddToTransaction(Item::RPMOps op, vector &files) - { -- int debug = _config->FindB("Debug::pkgRPMPM", false); -- int n = 0, rc, xx; -+ int rc; - FD_t fd; - rpmHeader hdr; - -@@ -744,7 +745,6 @@ bool pkgRPMLibPM::Process(vectorFindB("RPM::Interactive",true); -- int debug = _config->FindB("Debug::pkgRPMPM", false); - string Dir = _config->Find("RPM::RootDir"); - rpmReadConfigFiles(NULL, NULL); - -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmrecords.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmrecords.cc ---- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmrecords.cc 2006-01-16 23:10:47 +0000 -+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmrecords.cc 2006-04-01 17:19:39 +0000 -@@ -407,7 +407,7 @@ void rpmRecordParser::GetRec(const char - headerGetEntry(HeaderP, RPMTAG_ARCH, &type, (void **)&str, &count); - BufCatTag("\nArchitecture: ", str); - -- snprintf(buf, sizeof(buf), "%d", Handler->FileSize()); -+ snprintf(buf, sizeof(buf), "%lu", Handler->FileSize()); - BufCatTag("\nSize: ", buf); - - BufCatTag("\nMD5Sum: ", Handler->MD5Sum().c_str()); -diff -upk.orig apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmsystem.cc apt-0.5.15lorg2/apt-pkg/rpm/rpmsystem.cc ---- apt-0.5.15lorg2.orig/apt-pkg/rpm/rpmsystem.cc 2006-04-01 16:14:46 +0000 -+++ apt-0.5.15lorg2/apt-pkg/rpm/rpmsystem.cc 2006-04-01 17:19:39 +0000 -@@ -313,7 +313,7 @@ bool rpmSystem::AddStatusFiles(vector &List) -+void rpmSystem::AddSourceFiles(vector &List) - { - const Configuration::Item *Top; - Top = _config->Tree("APT::Arguments"); -@@ -330,7 +330,6 @@ bool rpmSystem::AddSourceFiles(vector &List); -- virtual bool AddSourceFiles(vector &List); -+ virtual void AddSourceFiles(vector &List); - virtual bool FindIndex(pkgCache::PkgFileIterator File, - pkgIndexFile *&Found) const; - virtual bool ProcessCache(pkgDepCache &Cache,pkgProblemResolver &Fix); -diff -upk.orig apt-0.5.15lorg2.orig/cmdline/apt-get.cc apt-0.5.15lorg2/cmdline/apt-get.cc ---- apt-0.5.15lorg2.orig/cmdline/apt-get.cc 2006-01-17 18:41:29 +0000 -+++ apt-0.5.15lorg2/cmdline/apt-get.cc 2006-04-01 17:19:39 +0000 -@@ -1223,7 +1223,7 @@ bool TryToInstall(pkgCache::PkgIterator - // Check if it's a different version of a package already - // considered as a good solution. - bool AlreadySeen = false; -- for (int i = 0; i != GoodSolutions.size(); i++) -+ for (unsigned int i = 0; i != GoodSolutions.size(); i++) - { - pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); - if (PrvPkg == GoodPkg) -@@ -1259,7 +1259,7 @@ bool TryToInstall(pkgCache::PkgIterator - } - } - vector GoodSolutionNames; -- for (int i = 0; i != GoodSolutions.size(); i++) -+ for (unsigned int i = 0; i != GoodSolutions.size(); i++) - { - pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); - GoodSolutionNames.push_back(GoodPkg.Name()); -@@ -1307,7 +1307,7 @@ bool TryToInstall(pkgCache::PkgIterator - { - ioprintf(c1out,_("Package %s is a virtual package provided by:\n"), - Pkg.Name()); -- for (int i = 0; i != GoodSolutions.size(); i++) -+ for (unsigned int i = 0; i != GoodSolutions.size(); i++) - { - pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); - if (GoodPkg.CurrentVer().end() == false) -diff -upk.orig apt-0.5.15lorg2.orig/cmdline/apt-shell.cc apt-0.5.15lorg2/cmdline/apt-shell.cc ---- apt-0.5.15lorg2.orig/cmdline/apt-shell.cc 2006-01-16 23:10:47 +0000 -+++ apt-0.5.15lorg2/cmdline/apt-shell.cc 2006-04-01 17:19:39 +0000 -@@ -1292,7 +1292,7 @@ bool TryToInstall(pkgCache::PkgIterator - // Check if it's a different version of a package already - // considered as a good solution. - bool AlreadySeen = false; -- for (int i = 0; i != GoodSolutions.size(); i++) -+ for (unsigned int i = 0; i != GoodSolutions.size(); i++) - { - pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); - if (PrvPkg == GoodPkg) -@@ -1328,7 +1328,7 @@ bool TryToInstall(pkgCache::PkgIterator - } - } - vector GoodSolutionNames; -- for (int i = 0; i != GoodSolutions.size(); i++) -+ for (unsigned int i = 0; i != GoodSolutions.size(); i++) - { - pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); - GoodSolutionNames.push_back(GoodPkg.Name()); -@@ -1377,7 +1377,7 @@ bool TryToInstall(pkgCache::PkgIterator - { - ioprintf(c1out,_("Package %s is a virtual package provided by:\n"), - Pkg.Name()); -- for (int i = 0; i != GoodSolutions.size(); i++) -+ for (unsigned int i = 0; i != GoodSolutions.size(); i++) - { - pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); - if (GoodPkg.CurrentVer().end() == false) -@@ -4464,7 +4464,7 @@ int main(int argc,const char *argv[]) - _lua->HasScripts("Scripts::AptCache::Command")); - #endif - -- int largc; -+ unsigned int largc; - const char *largv[1024]; - char *line, *p, *q; - largv[0] = ""; -diff -upk.orig apt-0.5.15lorg2.orig/methods/gpg.cc apt-0.5.15lorg2/methods/gpg.cc ---- apt-0.5.15lorg2.orig/methods/gpg.cc 2006-01-16 23:10:47 +0000 -+++ apt-0.5.15lorg2/methods/gpg.cc 2006-04-01 17:27:16 +0000 -@@ -255,7 +255,8 @@ char *getFileSigner(const char *file, co - { - char *sig; - ptr = sig = ptr1 + sizeof(SIGPACK); -- while (isxdigit(*ptr) && (ptr-sig) < sizeof(keyid)) ptr++; -+ while (ptr < sig + sizeof(keyid) && isxdigit(*ptr)) -+ ptr++; - *ptr = 0; - strcpy(keyid, sig); - } diff --git a/apt/apt-pkg/acquire-item.cc b/apt/apt-pkg/acquire-item.cc index 9701947..571e09c 100644 --- a/apt/apt-pkg/acquire-item.cc +++ b/apt/apt-pkg/acquire-item.cc @@ -48,7 +48,7 @@ using std::string; // --------------------------------------------------------------------- /* Returns false only if the checksums fail (the file not existing is not a checksum mismatch) */ -bool VerifyChecksums(string File,unsigned long Size,string MD5) +static bool VerifyChecksums(string File, unsigned long Size, string MD5) { struct stat Buf; @@ -286,7 +286,7 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5, ErrorText = _("Size mismatch"); Rename(DestFile,DestFile + ".FAILED"); if (_config->FindB("Acquire::Verbose",false) == true) - _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul", + _error->Warning("Size mismatch of index file %s: %lu was supposed to be %lu", RealURI.c_str(), Size, FSize); return; } @@ -566,7 +566,7 @@ void pkgAcqIndexRel::Done(string Message,unsigned long Size,string MD5, ErrorText = _("Size mismatch"); Rename(DestFile,DestFile + ".FAILED"); if (_config->FindB("Acquire::Verbose",false) == true) - _error->Warning("Size mismatch of index file %s: %ul was supposed to be %ul", + _error->Warning("Size mismatch of index file %s: %lu was supposed to be %lu", RealURI.c_str(), Size, FSize); return; } diff --git a/apt/apt-pkg/luaiface.h b/apt/apt-pkg/luaiface.h index 79a980a..7636d23 100644 --- a/apt/apt-pkg/luaiface.h +++ b/apt/apt-pkg/luaiface.h @@ -56,8 +56,9 @@ class Lua { void RunInteractive(const string &PlaceHint) { RunInteractive(PlaceHint.c_str()); }; + //or all of this RunScript should be void? bool RunScript(const string &Script, const string &ChunkCacheKey="") - { RunScript(Script.c_str(), (ChunkCacheKey.length() == 0) ? + { return RunScript(Script.c_str(), ChunkCacheKey.empty() ? NULL : ChunkCacheKey.c_str()); }; bool RunScript(const char *Script, const char *ChunkCacheKey=NULL); bool RunScripts(const char *ConfListKey, bool CacheChunks=false); diff --git a/apt/apt-pkg/pkgrecords.cc b/apt/apt-pkg/pkgrecords.cc index b39031b..414929a 100644 --- a/apt/apt-pkg/pkgrecords.cc +++ b/apt/apt-pkg/pkgrecords.cc @@ -56,7 +56,8 @@ pkgRecords::~pkgRecords() { // CNC:2002-11-28 // See comments above. - for (unsigned I = 0; I != PackageFileCount; I++) + // PackageFileCount is int according to apt-pkg/pkgrecords.h + for (int I = 0; I != PackageFileCount; I++) delete Files[I]; delete [] Files; } diff --git a/apt/apt-pkg/pkgsystem.h b/apt/apt-pkg/pkgsystem.h index 6ea113d..50bbbf4 100644 --- a/apt/apt-pkg/pkgsystem.h +++ b/apt/apt-pkg/pkgsystem.h @@ -90,7 +90,7 @@ class pkgSystem // Return a list of system index files.. virtual bool AddStatusFiles(std::vector &List) = 0; // CNC:2003-11-21 - virtual bool AddSourceFiles(std::vector &List) {}; + virtual void AddSourceFiles(std::vector &List) {}; virtual bool FindIndex(pkgCache::PkgFileIterator File, pkgIndexFile *&Found) const = 0; diff --git a/apt/apt-pkg/rpm/rpmhandler.cc b/apt/apt-pkg/rpm/rpmhandler.cc index 0413a49..44a35a6 100644 --- a/apt/apt-pkg/rpm/rpmhandler.cc +++ b/apt/apt-pkg/rpm/rpmhandler.cc @@ -87,7 +87,7 @@ bool RPMFileHandler::Jump(unsigned Offset) { if (FD == NULL) return false; - if (lseek(Fileno(FD),Offset,SEEK_SET) != Offset) + if (lseek(Fileno(FD),Offset,SEEK_SET) != (off_t)Offset) return false; return Skip(); } @@ -347,7 +347,7 @@ string RPMDirHandler::MD5Sum() RPMDBHandler::RPMDBHandler(bool WriteLock) - : WriteLock(WriteLock), Handler(0) + : Handler(0), WriteLock(WriteLock) { #if RPM_VERSION >= 0x040000 RpmIter = NULL; diff --git a/apt/apt-pkg/rpm/rpmpackagedata.cc b/apt/apt-pkg/rpm/rpmpackagedata.cc index 0ce30fd..718a16b 100644 --- a/apt/apt-pkg/rpm/rpmpackagedata.cc +++ b/apt/apt-pkg/rpm/rpmpackagedata.cc @@ -296,7 +296,6 @@ int RPMPackageData::RpmArchScore(const char *Arch) bool RPMPackageData::IsCompatArch(string Arch) { - bool compat = false; for (vector::iterator I = CompatArch[BaseArch].begin(); I != CompatArch[BaseArch].end(); I++) { if (Arch == *I) diff --git a/apt/apt-pkg/rpm/rpmpm.cc b/apt/apt-pkg/rpm/rpmpm.cc index 741fb9b..1ec9bc9 100644 --- a/apt/apt-pkg/rpm/rpmpm.cc +++ b/apt/apt-pkg/rpm/rpmpm.cc @@ -410,7 +410,7 @@ bool pkgRPMExtPM::ExecRPM(Item::RPMOps op, vector &files) Args[n++] = _config->Find("Dir::Bin::rpm","rpm").c_str(); - bool nodeps; + bool nodeps = false; switch (op) { @@ -433,6 +433,8 @@ bool pkgRPMExtPM::ExecRPM(Item::RPMOps op, vector &files) operation = "-e"; nodeps = true; break; + default: + return false; } Args[n++] = operation; @@ -674,8 +676,7 @@ pkgRPMLibPM::~pkgRPMLibPM() bool pkgRPMLibPM::AddToTransaction(Item::RPMOps op, vector &files) { - int debug = _config->FindB("Debug::pkgRPMPM", false); - int n = 0, rc, xx; + int rc; FD_t fd; rpmHeader hdr; @@ -756,7 +757,6 @@ bool pkgRPMLibPM::Process(vector &install, int rc = 0; bool Success = false; bool Interactive = _config->FindB("RPM::Interactive",true); - int debug = _config->FindB("Debug::pkgRPMPM", false); string Dir = _config->Find("RPM::RootDir"); rpmReadConfigFiles(NULL, NULL); diff --git a/apt/apt-pkg/rpm/rpmrecords.cc b/apt/apt-pkg/rpm/rpmrecords.cc index 0671a85..54b2c02 100644 --- a/apt/apt-pkg/rpm/rpmrecords.cc +++ b/apt/apt-pkg/rpm/rpmrecords.cc @@ -431,7 +431,7 @@ void rpmRecordParser::GetRec(const char *&Start,const char *&Stop) headerGetEntry(HeaderP, RPMTAG_ARCH, &type, (void **)&str, &count); BufCatTag("\nArchitecture: ", str); - snprintf(buf, sizeof(buf), "%d", Handler->FileSize()); + snprintf(buf, sizeof(buf), "%lu", Handler->FileSize()); BufCatTag("\nSize: ", buf); BufCatTag("\nMD5Sum: ", Handler->MD5Sum().c_str()); diff --git a/apt/apt-pkg/rpm/rpmsystem.cc b/apt/apt-pkg/rpm/rpmsystem.cc index 97436d1..886211c 100644 --- a/apt/apt-pkg/rpm/rpmsystem.cc +++ b/apt/apt-pkg/rpm/rpmsystem.cc @@ -310,7 +310,7 @@ bool rpmSystem::AddStatusFiles(vector &List) // System::AddSourceFiles - Register aditional source files /*{{{*/ // --------------------------------------------------------------------- /* */ -bool rpmSystem::AddSourceFiles(vector &List) +void rpmSystem::AddSourceFiles(vector &List) { const Configuration::Item *Top; Top = _config->Tree("APT::Arguments"); @@ -327,7 +327,6 @@ bool rpmSystem::AddSourceFiles(vector &List) } } } - return true; } /*}}}*/ #ifdef OLD_FILEDEPS diff --git a/apt/apt-pkg/rpm/rpmsystem.h b/apt/apt-pkg/rpm/rpmsystem.h index 358b7c4..59acf56 100644 --- a/apt/apt-pkg/rpm/rpmsystem.h +++ b/apt/apt-pkg/rpm/rpmsystem.h @@ -61,7 +61,7 @@ class rpmSystem : public pkgSystem virtual signed Score(Configuration const &Cnf); virtual string DistroVer(Configuration const &Cnf); virtual bool AddStatusFiles(vector &List); - virtual bool AddSourceFiles(vector &List); + virtual void AddSourceFiles(vector &List); virtual bool FindIndex(pkgCache::PkgFileIterator File, pkgIndexFile *&Found) const; virtual bool ProcessCache(pkgDepCache &Cache,pkgProblemResolver &Fix); diff --git a/apt/cmdline/apt-get.cc b/apt/cmdline/apt-get.cc index 779677f..80a4d42 100644 --- a/apt/cmdline/apt-get.cc +++ b/apt/cmdline/apt-get.cc @@ -1223,7 +1223,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, // Check if it's a different version of a package already // considered as a good solution. bool AlreadySeen = false; - for (int i = 0; i != GoodSolutions.size(); i++) + for (unsigned int i = 0; i != GoodSolutions.size(); i++) { pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); if (PrvPkg == GoodPkg) @@ -1259,7 +1259,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, } } vector GoodSolutionNames; - for (int i = 0; i != GoodSolutions.size(); i++) + for (unsigned int i = 0; i != GoodSolutions.size(); i++) { pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); GoodSolutionNames.push_back(GoodPkg.Name()); @@ -1307,7 +1307,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, { ioprintf(c1out,_("Package %s is a virtual package provided by:\n"), Pkg.Name()); - for (int i = 0; i != GoodSolutions.size(); i++) + for (unsigned int i = 0; i != GoodSolutions.size(); i++) { pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); if (GoodPkg.CurrentVer().end() == false) diff --git a/apt/cmdline/apt-shell.cc b/apt/cmdline/apt-shell.cc index 06acf1e..6b39803 100644 --- a/apt/cmdline/apt-shell.cc +++ b/apt/cmdline/apt-shell.cc @@ -1286,7 +1286,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, // Check if it's a different version of a package already // considered as a good solution. bool AlreadySeen = false; - for (int i = 0; i != GoodSolutions.size(); i++) + for (unsigned int i = 0; i != GoodSolutions.size(); i++) { pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); if (PrvPkg == GoodPkg) @@ -1322,7 +1322,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, } } vector GoodSolutionNames; - for (int i = 0; i != GoodSolutions.size(); i++) + for (unsigned int i = 0; i != GoodSolutions.size(); i++) { pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); GoodSolutionNames.push_back(GoodPkg.Name()); @@ -1371,7 +1371,7 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache, { ioprintf(c1out,_("Package %s is a virtual package provided by:\n"), Pkg.Name()); - for (int i = 0; i != GoodSolutions.size(); i++) + for (unsigned int i = 0; i != GoodSolutions.size(); i++) { pkgCache::PkgIterator GoodPkg(Cache, GoodSolutions[i]); if (GoodPkg.CurrentVer().end() == false) @@ -4461,7 +4461,7 @@ int main(int argc,const char *argv[]) _lua->HasScripts("Scripts::AptCache::Command")); #endif - int largc; + unsigned int largc; const char *largv[1024]; char *line, *p, *q; largv[0] = ""; diff --git a/apt/methods/gpg.cc b/apt/methods/gpg.cc index 932397f..3ca1961 100644 --- a/apt/methods/gpg.cc +++ b/apt/methods/gpg.cc @@ -255,7 +255,8 @@ char *getFileSigner(const char *file, const char *sigfile, { char *sig; ptr = sig = ptr1 + sizeof(SIGPACK); - while (isxdigit(*ptr) && (ptr-sig) < sizeof(keyid)) ptr++; + while (ptr < sig + sizeof(keyid) && isxdigit(*ptr)) + ptr++; *ptr = 0; strcpy(keyid, sig); }