Skip to content

Commit

Permalink
Get an additional few cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Penguinwizzard committed Jun 26, 2018
1 parent 62e989e commit 80438b7
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
15 changes: 15 additions & 0 deletions bin/rl/rl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions bin/rl/xmlreader.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
namespace Xml
{

#pragma prefast(disable:26439) // implicit noexcept
#pragma prefast(disable:26495) // uninitialized member variable

// May want Unicode someday.

Expand Down
1 change: 1 addition & 0 deletions lib/Common/Codex/Utf8Codex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/Runtime/Base/FunctionBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 changes: 3 additions & 0 deletions lib/Runtime/Math/AsmJsMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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 change: 1 addition & 0 deletions lib/WasmReader/WasmBinaryReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 80438b7

Please sign in to comment.