fix: fix issues detected with clang-tidy-16

Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
Pawel Cieslak 2023-10-30 16:56:03 +00:00 committed by Compute-Runtime-Automation
parent c9d6615231
commit f29dc33b34
4 changed files with 7 additions and 4 deletions

View File

@ -3187,6 +3187,8 @@ TEST_F(MultipleDevicesTest, givenTopologyForTwoSubdevicesWhenGettingPhysicalSlic
mapping.sliceIndices[i] = i;
}
ASSERT_NE(0u, hwInfo.gtSystemInfo.SliceCount);
mapping.subsliceIndices.resize(hwInfo.gtSystemInfo.SubSliceCount / hwInfo.gtSystemInfo.SliceCount);
for (uint32_t i = 0; i < hwInfo.gtSystemInfo.SubSliceCount / hwInfo.gtSystemInfo.SliceCount; i++) {
mapping.subsliceIndices[i] = i;

View File

@ -107,8 +107,8 @@ int MockNlApi::genlHandleMsg(struct nl_msg *msg, void *arg) {
MyNlattr *head = new MyNlattr;
MyNlattr *next = head;
info.attrs = new struct nlattr *[pOps->o_cmds[cmdIndex].c_maxattr];
for (auto i = 0; i < pOps->o_cmds[cmdIndex].c_maxattr; i++) {
info.attrs = new struct nlattr *[_IAF_ATTR_COUNT];
for (auto i = 0; i < _IAF_ATTR_COUNT; i++) {
info.attrs[i] = nullptr;
}
next = addDefaultAttribs(info, next);

View File

@ -106,8 +106,8 @@ int MockNlApi::genlHandleMsg(struct nl_msg *msg, void *arg) {
MyNlattr *head = new MyNlattr;
MyNlattr *next = head;
info.attrs = new struct nlattr *[pOps->o_cmds[cmdIndex].c_maxattr];
for (auto i = 0; i < pOps->o_cmds[cmdIndex].c_maxattr; i++) {
info.attrs = new struct nlattr *[_IAF_ATTR_COUNT];
for (auto i = 0; i < _IAF_ATTR_COUNT; i++) {
info.attrs[i] = nullptr;
}
next = addDefaultAttribs(info, next);

View File

@ -421,6 +421,7 @@ TEST_F(GTPinTests, givenInvalidArgumentsThenBufferUnMapFails) {
EXPECT_EQ(&NEO::gtpinFreeBuffer, driverServices.bufferDeallocate);
EXPECT_EQ(&NEO::gtpinMapBuffer, driverServices.bufferMap);
ASSERT_EQ(&NEO::gtpinUnmapBuffer, driverServices.bufferUnMap);
ASSERT_NE(nullptr, driverServices.bufferUnMap);
retFromGtPin = (*driverServices.bufferUnMap)(nullptr, nullptr);
EXPECT_NE(GTPIN_DI_SUCCESS, retFromGtPin);