ソースを参照

Get an additional few cases

Derek Morris 7 年 前
コミット
80438b712a

+ 15 - 0
bin/rl/rl.h

@@ -21,7 +21,22 @@
 #include "xmlreader.h"
 #include "rlfeint.h"
 
+// Note that some of these look pretty bad, and are; this is a test host, so
+// we're not as concerned here.
 #pragma warning(disable:4127) // expression is constant, e.g., while(TRUE)
+#pragma warning(disable:6001) // using uninitialized memory
+#pragma warning(disable:6011) // dereferencing null pointer, potentially
+#pragma warning(disable:6031) // ignoring return value from some system calls
+#pragma warning(disable:6054) // string may not be zero-terminated
+#pragma warning(disable:6271) // Extra parameter not used by format string
+#pragma warning(disable:6262) // Function using too much stack for analyzer to look at it
+#pragma warning(disable:6335) // leaking process information handle
+#pragma warning(disable:6386) // Potential buffer overrun
+#pragma warning(disable:6387) // Potential misadherance to specification of library functions
+#pragma warning(disable:26439) // implicit noexcept
+#pragma warning(disable:26451) // Arithmetic on smaller type before widening conversion
+#pragma warning(disable:26495) // uninitialized member
+#pragma warning(disable:28193) // ignoring value that must be examined
 
 #define LOCAL static
 typedef __int32 int32;

+ 2 - 0
bin/rl/xmlreader.h

@@ -15,6 +15,8 @@
 namespace Xml
 {
 
+#pragma prefast(disable:26439) // implicit noexcept
+#pragma prefast(disable:26495) // uninitialized member variable
 
 // May want Unicode someday.
 

+ 1 - 0
lib/Common/Codex/Utf8Codex.cpp

@@ -17,6 +17,7 @@
 #pragma warning(push)
 
 #pragma warning(disable: 4127)  // constant expression for template parameter
+#pragma warning(disable: 26451) // size-conversion/arithmetic-operation ordering
 #endif
 
 namespace utf8

+ 2 - 2
lib/Runtime/Base/FunctionBody.cpp

@@ -1149,7 +1149,7 @@ namespace Js
     FunctionBody::SetOutParamMaxDepth(RegSlot cOutParamsDepth)
     {
 #if _M_X64
-        const RegSlot minAsmJsOutParams = MinAsmJsOutParams();
+        constexpr RegSlot minAsmJsOutParams = MinAsmJsOutParams();
         if (GetIsAsmJsFunction() && cOutParamsDepth < minAsmJsOutParams)
         {
             cOutParamsDepth = minAsmJsOutParams;
@@ -9579,4 +9579,4 @@ namespace Js
 // Don't grow these data structure unless absolutely necessary
 CompileAssert(sizeof(Js::EntryPointInfo) <= 56);
 CompileAssert(sizeof(Js::FunctionEntryPointInfo) <= 96);
-#endif
+#endif

+ 3 - 0
lib/Runtime/Math/AsmJsMath.cpp

@@ -12,6 +12,8 @@ namespace Js
 #else
 #define DB_NOINLINE
 #endif
+#pragma prefast(push)
+#pragma prefast(disable:26450) // PREfast takes issue with how INT_MIN is defined
 
     // Double
     template<> DB_NOINLINE double AsmJsMath::DivChecked<double>(double aLeft, double aRight) { return aLeft / aRight; }
@@ -93,3 +95,4 @@ namespace Js
     }
     template<> bool AsmJsMath::RemWouldTrap(uint64 aLeft, uint64 aRight) { return aRight == 0 || (aLeft == LONGLONG_MIN && aRight == -1); }
 }
+#pragma prefast(pop

+ 1 - 0
lib/WasmReader/WasmBinaryReader.cpp

@@ -1279,6 +1279,7 @@ LEBType WasmBinaryReader::LEB128(uint32 &length)
 
     if (sign && (shift < (sizeof(LEBType) * 8)) && (0x40 & b))
     {
+#pragma prefast(suppress:26453)
         result |= ((~(LEBType)0) << shift);
     }
     return result;