Skip to content

Commit f7e7c3e

Browse files
committed
disable MSVC C6285 warning produced by gtest
1 parent f8b0880 commit f7e7c3e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/pools/pool_residency.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
#include "pool.hpp"
1010
#include "gtest/gtest.h"
1111

12+
// On MSVC disable C6285 warning produced by gtest:
13+
// (<non-zero constant> || <non-zero constant>) is always a non-zero constant.
14+
// Did you intend to use the bitwise-and operator?
15+
#ifdef _MSC_VER
16+
#pragma warning(disable : 6285)
17+
#endif
18+
1219
using namespace testing;
1320

1421
class PoolResidencyTestFixture : public Test {
@@ -53,6 +60,7 @@ TEST_F(PoolResidencyTestFixture,
5360
EXPECT_CALL(l0mock, zeMemAllocDevice(CONTEXT, _, _, _, OUR_DEVICE, _))
5461
.WillOnce(
5562
DoAll(SetArgPointee<5>(POINTER_0), Return(ZE_RESULT_SUCCESS)));
63+
5664
EXPECT_CALL(l0mock, zeContextMakeMemoryResident(CONTEXT, DEVICE_0, _, _))
5765
.WillOnce(Return(ZE_RESULT_SUCCESS));
5866
EXPECT_CALL(l0mock, zeContextMakeMemoryResident(CONTEXT, DEVICE_1, _, _))

0 commit comments

Comments
 (0)