]> git.saurik.com Git - apt.git/commitdiff
Fix more warnings from clang
authorMichael Vogt <mvo@debian.org>
Wed, 28 May 2014 08:29:23 +0000 (10:29 +0200)
committerMichael Vogt <mvo@debian.org>
Thu, 29 May 2014 10:17:47 +0000 (12:17 +0200)
Reported-By: clang++ -Werror
Conflicts:
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
apt-pkg/deb/debmetaindex.h

apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
apt-pkg/cacheset.h
apt-pkg/deb/debmetaindex.cc
apt-pkg/deb/debmetaindex.h
apt-pkg/deb/debsrcrecords.cc
apt-pkg/pkgrecords.cc

index 99013d649eb591d765a7803ca741e32912696e67..70d03b84576d8ae63ca2a4b3fb048e6756115d97 100644 (file)
@@ -1620,7 +1620,6 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify)                           /*{{{*/
 
    // at this point the real Items are loaded in the fetcher
    ExpectedAdditionalItems = 0;
 
    // at this point the real Items are loaded in the fetcher
    ExpectedAdditionalItems = 0;
-
    for (vector <IndexTarget*>::const_iterator Target = IndexTargets->begin();
         Target != IndexTargets->end();
         ++Target)
    for (vector <IndexTarget*>::const_iterator Target = IndexTargets->begin();
         Target != IndexTargets->end();
         ++Target)
index 3d863874cdc1e9dad16e81f570197a870e49c8f4..6e204813a7b927772912d8d2be103f6f59270d9d 100644 (file)
@@ -745,7 +745,7 @@ class pkgAcqIndex : public pkgAcqBaseIndex
               std::string ShortDesc, HashStringList const &ExpectedHashes,
               std::string compressExt="");
    pkgAcqIndex(pkgAcquire *Owner,
               std::string ShortDesc, HashStringList const &ExpectedHashes,
               std::string compressExt="");
    pkgAcqIndex(pkgAcquire *Owner,
-               struct IndexTarget const * const Target,
+               IndexTarget const * const Target,
                HashStringList const &ExpectedHash,
                indexRecords *MetaIndexParser);
    void Init(std::string const &URI, std::string const &URIDesc,
                HashStringList const &ExpectedHash,
                indexRecords *MetaIndexParser);
    void Init(std::string const &URI, std::string const &URIDesc,
index 16a3daa423cfcb8101c85c4712aee14d302da44c..dde4e221e219e09e9a208ffce1e455fbca17d0c0 100644 (file)
@@ -584,7 +584,7 @@ public:                                                                     /*{{{*/
 
        static VersionContainer FromString(pkgCacheFile &Cache, std::string const &pkg,
                        Version const &fallback, CacheSetHelper &helper,
 
        static VersionContainer FromString(pkgCacheFile &Cache, std::string const &pkg,
                        Version const &fallback, CacheSetHelper &helper,
-                       bool const onlyFromName = false) {
+                                           bool const /*onlyFromName = false*/) {
                VersionContainer vercon;
                VersionContainerInterface::FromString(&vercon, Cache, pkg, fallback, helper);
                return vercon;
                VersionContainer vercon;
                VersionContainerInterface::FromString(&vercon, Cache, pkg, fallback, helper);
                return vercon;
index 607dae882a453f2476c4d0dc5664ccc26a43cc0a..73010e8672100febca469f3bffd1c32b62d81c63 100644 (file)
@@ -186,8 +186,8 @@ debReleaseIndex::~debReleaseIndex() {
                        delete *S;
 }
 
                        delete *S;
 }
 
-vector <struct IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const {
-       vector <struct IndexTarget *>* IndexTargets = new vector <IndexTarget *>;
+vector <IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const {
+       vector <IndexTarget *>* IndexTargets = new vector <IndexTarget *>;
 
        map<string, vector<debSectionEntry const*> >::const_iterator const src = ArchEntries.find("source");
        if (src != ArchEntries.end()) {
 
        map<string, vector<debSectionEntry const*> >::const_iterator const src = ArchEntries.find("source");
        if (src != ArchEntries.end()) {
@@ -255,8 +255,8 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool const &GetAll) const
 
    // special case for --print-uris
    if (GetAll) {
 
    // special case for --print-uris
    if (GetAll) {
-      vector <struct IndexTarget *> *targets = ComputeIndexTargets();
-      for (vector <struct IndexTarget*>::const_iterator Target = targets->begin(); Target != targets->end(); ++Target) {
+      vector <IndexTarget *> *targets = ComputeIndexTargets();
+      for (vector <IndexTarget*>::const_iterator Target = targets->begin(); Target != targets->end(); ++Target) {
         new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
                         (*Target)->ShortDesc, HashStringList());
       }
         new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
                         (*Target)->ShortDesc, HashStringList());
       }
index 0e70bba87d0986da01a067fec374fdfb7f166abf..7091c198f3867528782025106f1ac37951169720 100644 (file)
@@ -19,6 +19,7 @@
 class pkgAcquire;
 class pkgIndexFile;
 class debDebPkgFileIndex;
 class pkgAcquire;
 class pkgIndexFile;
 class debDebPkgFileIndex;
+class IndexTarget;
 
 class debReleaseIndex : public metaIndex {
    public:
 
 class debReleaseIndex : public metaIndex {
    public:
@@ -45,7 +46,7 @@ class debReleaseIndex : public metaIndex {
 
    virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
 
    virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
-   std::vector <struct IndexTarget *>* ComputeIndexTargets() const;
+   std::vector <IndexTarget *>* ComputeIndexTargets() const;
    std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const;
 
    std::string MetaIndexInfo(const char *Type) const;
    std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const;
 
    std::string MetaIndexInfo(const char *Type) const;
index bf5e56ec9ee4dc8e98b78c93bbb23fcb92b53102..76ba670c6f4d2ff481eb54d95e5356e5371eb9f5 100644 (file)
@@ -57,12 +57,13 @@ const char **debSrcRecordParser::Binaries()
       char* binStartNext = strchrnul(bin, ',');
       char* binEnd = binStartNext - 1;
       for (; isspace(*binEnd) != 0; --binEnd)
       char* binStartNext = strchrnul(bin, ',');
       char* binEnd = binStartNext - 1;
       for (; isspace(*binEnd) != 0; --binEnd)
-        binEnd = '\0';
+        binEnd = 0;
       StaticBinList.push_back(bin);
       if (*binStartNext != ',')
         break;
       *binStartNext = '\0';
       StaticBinList.push_back(bin);
       if (*binStartNext != ',')
         break;
       *binStartNext = '\0';
-      for (bin = binStartNext + 1; isspace(*bin) != 0; ++bin);
+      for (bin = binStartNext + 1; isspace(*bin) != 0; ++bin)
+         ;
    } while (*bin != '\0');
    StaticBinList.push_back(NULL);
 
    } while (*bin != '\0');
    StaticBinList.push_back(NULL);
 
index c403e4dc312cde3725b4bd37cc8ce800f1fcdf4e..859af3a0921a0bc58d1d663c3f0fbaaf5a2fa9a3 100644 (file)
@@ -26,7 +26,7 @@
 // Records::pkgRecords - Constructor                                   /*{{{*/
 // ---------------------------------------------------------------------
 /* This will create the necessary structures to access the status files */
 // Records::pkgRecords - Constructor                                   /*{{{*/
 // ---------------------------------------------------------------------
 /* This will create the necessary structures to access the status files */
-pkgRecords::pkgRecords(pkgCache &Cache) : d(NULL), Cache(Cache),
+pkgRecords::pkgRecords(pkgCache &aCache) : d(NULL), Cache(aCache),
   Files(Cache.HeaderP->PackageFileCount)
 {
    for (pkgCache::PkgFileIterator I = Cache.FileBegin();
   Files(Cache.HeaderP->PackageFileCount)
 {
    for (pkgCache::PkgFileIterator I = Cache.FileBegin();