Skip to content

Commit 6285aee

Browse files
disable warnings
1 parent 83edb62 commit 6285aee

11 files changed

+37
-2
lines changed

bin/NativeTests/CodexTests.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44
//-------------------------------------------------------------------------------------------------------
55
#include "stdafx.h"
6+
#pragma warning(disable:26439)
7+
#pragma warning(disable:26451)
8+
#pragma warning(disable:26495)
69
#include "catch.hpp"
710
#include <process.h>
811
#include "Codex\Utf8Codex.h"
@@ -280,4 +283,4 @@ namespace CodexTest
280283

281284
RunUtf8DecodeTestCase(testCases, utf8::DecodeUnitsIntoAndNullTerminateNoAdvance);
282285
}
283-
};
286+
};

bin/NativeTests/FileLoadHelpers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ HRESULT FileLoadHelpers::LoadScriptFromFile(LPCSTR filename, LPCWSTR& contents,
114114
utf8::DecodeOptions decodeOptions = utf8::doAllowInvalidWCHARs;
115115

116116
UINT cUtf16Chars = utf8::ByteIndexIntoCharacterIndex(pRawBytes, lengthBytes, decodeOptions);
117-
contents = (LPCWSTR)HeapAlloc(GetProcessHeap(), 0, (cUtf16Chars + 1) * sizeof(WCHAR));
117+
contents = (LPCWSTR)HeapAlloc(GetProcessHeap(), 0, (cUtf16Chars + (size_t)1) * sizeof(WCHAR));
118118
if (nullptr == contents)
119119
{
120120
fwprintf(stderr, _u("out of memory"));

bin/NativeTests/FunctionExecutionTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44
//-------------------------------------------------------------------------------------------------------
55
#include "stdafx.h"
6+
#pragma warning(disable:26439)
7+
#pragma warning(disable:26451)
8+
#pragma warning(disable:26495)
69
#include "catch.hpp"
710
#include "FunctionExecutionTest.h"
811

bin/NativeTests/FunctionExecutionTest.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// This file contains stubs needed to make FunctionExecutionTest successfully compile and link as well
77
// as a means to emulate behavior of objects that interact with FunctionExecutionStateMachine
88

9+
#include "..\..\lib\Common\Warnings.h"
910
#include "..\..\lib\Common\Core\CommonMinMax.h"
1011

1112
#define ENUM_CLASS_HELPERS(x, y)

bin/NativeTests/JsDiagApiTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
//-------------------------------------------------------------------------------------------------------
55

66
#include "stdafx.h"
7+
#pragma warning(disable:26439)
8+
#pragma warning(disable:26451)
9+
#pragma warning(disable:26495)
710
#include "catch.hpp"
811
#include <process.h>
912

bin/NativeTests/JsRTApiTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44
//-------------------------------------------------------------------------------------------------------
55
#include "stdafx.h"
6+
#pragma warning(disable:26439)
7+
#pragma warning(disable:26451)
8+
#pragma warning(disable:26495)
69
#include "catch.hpp"
710
#include <array>
811
#include <process.h>

bin/NativeTests/MemoryPolicyTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44
//-------------------------------------------------------------------------------------------------------
55
#include "stdafx.h"
6+
#pragma warning(disable:26439)
7+
#pragma warning(disable:26451)
8+
#pragma warning(disable:26495)
69
#include "catch.hpp"
710

811
#pragma warning(disable:6387) // suppressing preFAST which raises warning for passing null to the JsRT APIs

bin/NativeTests/NativeTests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// conversion from 'int' to 'char', possible loss of data
1010
#pragma warning(disable:4242)
1111
#pragma warning(disable:4244)
12+
#pragma warning(disable:26439)
13+
#pragma warning(disable:26451)
14+
#pragma warning(disable:26495)
1215
#include "catch.hpp"
1316
#pragma warning(pop)
1417

bin/NativeTests/ThreadServiceTest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
//-------------------------------------------------------------------------------------------------------
55

66
#include "stdafx.h"
7+
#pragma warning(disable:26439)
8+
#pragma warning(disable:26451)
9+
#pragma warning(disable:26495)
710
#include "catch.hpp"
811

912
#pragma warning(disable:6387) // suppressing preFAST which raises warning for passing null to the JsRT APIs

bin/NativeTests/UnicodeTextTests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
//-------------------------------------------------------------------------------------------------------
55

66
#include "stdafx.h"
7+
#pragma warning(disable:26439)
8+
#pragma warning(disable:26451)
9+
#pragma warning(disable:26495)
710
#include "catch.hpp"
811

912
namespace UnicodeTextTest

0 commit comments

Comments
 (0)