fix: fix issues detected with clang-tidy-16
Signed-off-by: Pawel Cieslak <pawel.cieslak@intel.com>
This commit is contained in:
parent
c9d6615231
commit
f29dc33b34
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue