Kaynağa Gözat

Address remaining issues for enabling dev15 jenkins ci

Derek Morris 7 yıl önce
ebeveyn
işleme
b3695e0361
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 2 2
      bin/GCStress/WeightedTable.h
  2. 1 0
      lib/Common/Warnings.h

+ 2 - 2
bin/GCStress/WeightedTable.h

@@ -13,14 +13,14 @@ template <class T>
 class WeightedTable
 {
 public:
-    WeightedTable() :
+    WeightedTable() noexcept :
         entries(nullptr), size(0)
     {
     }
 
     void AddWeightedEntry(T value, unsigned int weight)
     {
-        T * newEntries = static_cast<T *>(realloc(entries, (size + weight) * sizeof(T)));
+        T * newEntries = static_cast<T *>(realloc(entries, ((size_t)size + weight) * sizeof(T)));
         if (newEntries == nullptr)
         {
             // Should throw something better

+ 1 - 0
lib/Common/Warnings.h

@@ -54,6 +54,7 @@
 #pragma warning(disable:25040)      // False Constant Expr in OR, e.g., <expr> || 0.
 #pragma warning(disable:25041)      // 'if' condition is always true
 #pragma warning(disable:25042)      // 'if' condition is always false
+#pragma warning(disable:26434)      // function definition hides a non-virtual function
 #pragma warning(disable:26437)      // avoid slicing - this is more of a guideline than a rule, and we don't do it often regardless
 #pragma warning(disable:26439)      // noexcept specifier implied
 #pragma warning(disable:26451)      // doing math on smaller types than possible