Skip to content

Commit 80438b7

Browse files
Get an additional few cases
1 parent 62e989e commit 80438b7

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

bin/rl/rl.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,22 @@
2121
#include "xmlreader.h"
2222
#include "rlfeint.h"
2323

24+
// Note that some of these look pretty bad, and are; this is a test host, so
25+
// we're not as concerned here.
2426
#pragma warning(disable:4127) // expression is constant, e.g., while(TRUE)
27+
#pragma warning(disable:6001) // using uninitialized memory
28+
#pragma warning(disable:6011) // dereferencing null pointer, potentially
29+
#pragma warning(disable:6031) // ignoring return value from some system calls
30+
#pragma warning(disable:6054) // string may not be zero-terminated
31+
#pragma warning(disable:6271) // Extra parameter not used by format string
32+
#pragma warning(disable:6262) // Function using too much stack for analyzer to look at it
33+
#pragma warning(disable:6335) // leaking process information handle
34+
#pragma warning(disable:6386) // Potential buffer overrun
35+
#pragma warning(disable:6387) // Potential misadherance to specification of library functions
36+
#pragma warning(disable:26439) // implicit noexcept
37+
#pragma warning(disable:26451) // Arithmetic on smaller type before widening conversion
38+
#pragma warning(disable:26495) // uninitialized member
39+
#pragma warning(disable:28193) // ignoring value that must be examined
2540

2641
#define LOCAL static
2742
typedef __int32 int32;

bin/rl/xmlreader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
namespace Xml
1616
{
1717

18+
#pragma prefast(disable:26439) // implicit noexcept
19+
#pragma prefast(disable:26495) // uninitialized member variable
1820

1921
// May want Unicode someday.
2022

lib/Common/Codex/Utf8Codex.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#pragma warning(push)
1818

1919
#pragma warning(disable: 4127) // constant expression for template parameter
20+
#pragma warning(disable: 26451) // size-conversion/arithmetic-operation ordering
2021
#endif
2122

2223
namespace utf8

lib/Runtime/Base/FunctionBody.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ namespace Js
11491149
FunctionBody::SetOutParamMaxDepth(RegSlot cOutParamsDepth)
11501150
{
11511151
#if _M_X64
1152-
const RegSlot minAsmJsOutParams = MinAsmJsOutParams();
1152+
constexpr RegSlot minAsmJsOutParams = MinAsmJsOutParams();
11531153
if (GetIsAsmJsFunction() && cOutParamsDepth < minAsmJsOutParams)
11541154
{
11551155
cOutParamsDepth = minAsmJsOutParams;
@@ -9579,4 +9579,4 @@ namespace Js
95799579
// Don't grow these data structure unless absolutely necessary
95809580
CompileAssert(sizeof(Js::EntryPointInfo) <= 56);
95819581
CompileAssert(sizeof(Js::FunctionEntryPointInfo) <= 96);
9582-
#endif
9582+
#endif

lib/Runtime/Math/AsmJsMath.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ namespace Js
1212
#else
1313
#define DB_NOINLINE
1414
#endif
15+
#pragma prefast(push)
16+
#pragma prefast(disable:26450) // PREfast takes issue with how INT_MIN is defined
1517

1618
// Double
1719
template<> DB_NOINLINE double AsmJsMath::DivChecked<double>(double aLeft, double aRight) { return aLeft / aRight; }
@@ -93,3 +95,4 @@ namespace Js
9395
}
9496
template<> bool AsmJsMath::RemWouldTrap(uint64 aLeft, uint64 aRight) { return aRight == 0 || (aLeft == LONGLONG_MIN && aRight == -1); }
9597
}
98+
#pragma prefast(pop

lib/WasmReader/WasmBinaryReader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,7 @@ LEBType WasmBinaryReader::LEB128(uint32 &length)
12791279

12801280
if (sign && (shift < (sizeof(LEBType) * 8)) && (0x40 & b))
12811281
{
1282+
#pragma prefast(suppress:26453)
12821283
result |= ((~(LEBType)0) << shift);
12831284
}
12841285
return result;

0 commit comments

Comments
 (0)