fix: correct issues with clang tidy

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-10-31 10:53:21 +00:00
committed by Compute-Runtime-Automation
parent 28c6dbf8c1
commit e301418423
6 changed files with 18 additions and 18 deletions

View File

@@ -175,11 +175,11 @@ WddmEventsImp::WddmEventsImp(OsSysman *pOsSysman) {
// create an exit event with a default security decriptor with no name
bool manualResetObject = FALSE;
bool isEventStateSignalled = FALSE;
exitHandle = createWddmEvent(NULL, manualResetObject, isEventStateSignalled, NULL);
exitHandle = WddmEventsImp::createWddmEvent(NULL, manualResetObject, isEventStateSignalled, NULL);
}
WddmEventsImp::~WddmEventsImp() {
closeWddmHandle(exitHandle);
WddmEventsImp::closeWddmHandle(exitHandle);
}
OsEvents *OsEvents::create(OsSysman *pOsSysman) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2022 Intel Corporation
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -125,7 +125,7 @@ void signalArbSyncObject(OsContext &osContext, CL_GL_SYNC_INFO &glSyncInfo) {
signalServerClientSyncInfo.ObjectHandleArray[0] = glSyncInfo.serverSynchronizationObject;
signalServerClientSyncInfo.ObjectHandleArray[1] = glSyncInfo.clientSynchronizationObject;
signalServerClientSyncInfo.ObjectCount = 2;
NTSTATUS status = wddm->getGdi()->signalSynchronizationObject(&signalServerClientSyncInfo);
[[maybe_unused]] NTSTATUS status = wddm->getGdi()->signalSynchronizationObject(&signalServerClientSyncInfo);
if (STATUS_SUCCESS != status) {
DEBUG_BREAK_IF(true);
return;

View File

@@ -423,7 +423,7 @@ TEST_F(GTPinTests, givenInvalidArgumentsThenBufferUnMapFails) {
ASSERT_EQ(&NEO::gtpinUnmapBuffer, driverServices.bufferUnMap);
ASSERT_NE(nullptr, driverServices.bufferUnMap);
retFromGtPin = (*driverServices.bufferUnMap)(nullptr, nullptr);
retFromGtPin = NEO::gtpinUnmapBuffer(nullptr, nullptr);
EXPECT_NE(GTPIN_DI_SUCCESS, retFromGtPin);
cl_context ctxt = (cl_context)((Context *)pContext);

View File

@@ -35,7 +35,7 @@ TEST(D3DContextTest, givenDispatchTableThenItContainsValidEntries) {
EXPECT_EQ(&clEnqueueReleaseDX9ObjectsINTEL, context.dispatch.crtDispatch->clEnqueueReleaseDX9ObjectsINTEL);
}
struct clIntelSharingFormatQueryDX9 : public ApiTests {
struct ClIntelSharingFormatQueryDX9 : public ApiTests {
std::vector<D3DFORMAT> supportedNonPlanarFormats;
std::vector<D3DFORMAT> supportedPlanarFormats;
std::vector<D3DFORMAT> supportedPlane1Formats;
@@ -71,7 +71,7 @@ struct clIntelSharingFormatQueryDX9 : public ApiTests {
namespace ULT {
TEST_F(clIntelSharingFormatQueryDX9, givenInvalidContextWhenMediaSurfaceFormatsRequestedThenInvalidContextError) {
TEST_F(ClIntelSharingFormatQueryDX9, givenInvalidContextWhenMediaSurfaceFormatsRequestedThenInvalidContextError) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(nullptr, CL_MEM_READ_WRITE, CL_MEM_OBJECT_IMAGE2D, 0,
static_cast<cl_uint>(retrievedFormats.size()),
&retrievedFormats[0],
@@ -79,7 +79,7 @@ TEST_F(clIntelSharingFormatQueryDX9, givenInvalidContextWhenMediaSurfaceFormatsR
EXPECT_EQ(CL_INVALID_CONTEXT, retVal);
}
TEST_F(clIntelSharingFormatQueryDX9, givenInvalidFlagsWhenMediaSurfaceFormatsRequestedThenInvalidValueError) {
TEST_F(ClIntelSharingFormatQueryDX9, givenInvalidFlagsWhenMediaSurfaceFormatsRequestedThenInvalidValueError) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(
pContext, 0, CL_MEM_OBJECT_IMAGE2D, 0,
static_cast<cl_uint>(retrievedFormats.size()),
@@ -87,13 +87,13 @@ TEST_F(clIntelSharingFormatQueryDX9, givenInvalidFlagsWhenMediaSurfaceFormatsReq
EXPECT_EQ(CL_INVALID_VALUE, retVal);
}
TEST_F(clIntelSharingFormatQueryDX9, givenInvalidImageTypeWhenMediaSurfaceFormatsRequestedThenInvalidValueError) {
TEST_F(ClIntelSharingFormatQueryDX9, givenInvalidImageTypeWhenMediaSurfaceFormatsRequestedThenInvalidValueError) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(pContext, CL_MEM_READ_WRITE, 0, 0, static_cast<cl_uint>(retrievedFormats.size()),
&retrievedFormats[0], &numImageFormats);
EXPECT_EQ(CL_INVALID_VALUE, retVal);
}
TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestedMediaSurfaceFormatsBelowMaximumThenExceedingFormatAreaRemainsUntouched) {
TEST_F(ClIntelSharingFormatQueryDX9, givenValidParametersWhenRequestedMediaSurfaceFormatsBelowMaximumThenExceedingFormatAreaRemainsUntouched) {
for (cl_uint i = 0; i <= static_cast<cl_uint>(retrievedFormats.size()); ++i) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(pContext, CL_MEM_READ_WRITE, CL_MEM_OBJECT_IMAGE2D, 0, i,
&retrievedFormats[0], &numImageFormats);
@@ -104,7 +104,7 @@ TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestedMediaSurfa
}
}
TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlane0ThenAllKnownFormatsAreIncludedInTheResult) {
TEST_F(ClIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlane0ThenAllKnownFormatsAreIncludedInTheResult) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(pContext, CL_MEM_READ_WRITE, CL_MEM_OBJECT_IMAGE2D, 0,
static_cast<cl_uint>(retrievedFormats.size()),
&retrievedFormats[0],
@@ -124,7 +124,7 @@ TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurf
}
}
TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlane1ThenOnlyPlanarFormatsAreIncludedInTheResult) {
TEST_F(ClIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlane1ThenOnlyPlanarFormatsAreIncludedInTheResult) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(pContext, CL_MEM_READ_WRITE, CL_MEM_OBJECT_IMAGE2D, 1,
static_cast<cl_uint>(retrievedFormats.size()),
&retrievedFormats[0],
@@ -144,7 +144,7 @@ TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurf
}
}
TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlane2ThenOnlyYV12FormatIsIncludedInTheResult) {
TEST_F(ClIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlane2ThenOnlyYV12FormatIsIncludedInTheResult) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(pContext, CL_MEM_READ_WRITE, CL_MEM_OBJECT_IMAGE2D, 2,
static_cast<cl_uint>(retrievedFormats.size()),
&retrievedFormats[0],
@@ -163,7 +163,7 @@ TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurf
}
}
TEST_F(clIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlaneGraterThan2ThenZeroNumFormatsIsReturned) {
TEST_F(ClIntelSharingFormatQueryDX9, givenValidParametersWhenRequestingMediaSurfaceFormatsForPlaneGraterThan2ThenZeroNumFormatsIsReturned) {
retVal = clGetSupportedDX9MediaSurfaceFormatsINTEL(pContext, CL_MEM_READ_WRITE, CL_MEM_OBJECT_IMAGE2D, 3,
0,
nullptr,

View File

@@ -292,7 +292,7 @@ LSTATUS regQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDW
if (strcmp(lpValueName, "settingSourceString") == 0) {
const auto settingSource = "registry";
if (lpData) {
strcpy(reinterpret_cast<char *>(lpData), settingSource);
strcpy_s(reinterpret_cast<char *>(lpData), strlen(settingSource) + 1u, settingSource);
} else {
*lpcbData = static_cast<DWORD>(strlen(settingSource) + 1u);
if (lpType) {
@@ -330,7 +330,7 @@ LSTATUS regQueryValueExA(HKEY hKey, LPCSTR lpValueName, LPDWORD lpReserved, LPDW
}
} else if (driverStorePath && (strcmp(lpValueName, "DriverStorePathForComputeRuntime") == 0)) {
if (lpData) {
strcpy(reinterpret_cast<char *>(lpData), driverStorePath);
strcpy_s(reinterpret_cast<char *>(lpData), strlen(driverStorePath) + 1u, driverStorePath);
}
if (lpcbData) {
*lpcbData = static_cast<DWORD>(strlen(driverStorePath) + 1u);

View File

@@ -41,7 +41,7 @@ class WddmWithKmDafMock : public Wddm {
class WddmKmDafListenerTest : public ::testing::Test {
public:
void SetUp() {
void SetUp() override {
executionEnvironment.initializeMemoryManager();
rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get();
auto osEnvironment = new OsEnvironmentWin();
@@ -51,7 +51,7 @@ class WddmKmDafListenerTest : public ::testing::Test {
wddmWithKmDafMock->init();
wddmWithKmDafMock->featureTable->flags.ftrKmdDaf = true;
}
void TearDown() {
void TearDown() override {
}
MockExecutionEnvironment executionEnvironment{};