瀏覽代碼

apt-pkg/indexrecords.cc: ensure that indexRecords::checkSum::Hash is initialized

Michael Vogt 12 年之前
父節點
當前提交
1a91569d0a
共有 1 個文件被更改,包括 8 次插入 和 0 次删除
  1. 8 0
      apt-pkg/indexrecords.cc

+ 8 - 0
apt-pkg/indexrecords.cc

@@ -116,6 +116,14 @@ bool indexRecords::Load(const string Filename)				/*{{{*/
             indexRecords::checkSum *Sum = new indexRecords::checkSum;
             indexRecords::checkSum *Sum = new indexRecords::checkSum;
             Sum->MetaKeyFilename = Name;
             Sum->MetaKeyFilename = Name;
             Sum->Size = Size;
             Sum->Size = Size;
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic push
+       #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+            Sum->Hash = HashString(HashString::SupportedHashes()[i],Hash);
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic pop
+#endif
             Entries[Name] = Sum;
             Entries[Name] = Sum;
          }
          }
          Entries[Name]->Hashes.push_back(HashString(HashString::SupportedHashes()[i],Hash));
          Entries[Name]->Hashes.push_back(HashString(HashString::SupportedHashes()[i],Hash));