Skip to content

Commit d0522a0

Browse files
authored
Initialize pCount to zero for zesDriverGet (#50)
Signed-off-by: Bellekallu Rajkiran <[email protected]>
1 parent c99886b commit d0522a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

conformance_tests/sysman/test_sysman_init/src/test_init.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ TEST(SysmanInitTests,
4545
TEST(SysmanInitTests,
4646
GivenCoreNotInitializedWhenSysmanInitializedThenzesDriverGetWorks) {
4747
ASSERT_EQ(ZE_RESULT_SUCCESS, zesInit(0));
48-
uint32_t pCount;
48+
uint32_t pCount = 0;
4949
ASSERT_EQ(ZE_RESULT_SUCCESS, zesDriverGet(&pCount, nullptr));
5050
ASSERT_GT(pCount, 0);
5151
}
@@ -55,7 +55,7 @@ TEST(SysmanInitTests,
5555
static char sys_env[] = "ZES_ENABLE_SYSMAN=1";
5656
putenv(sys_env);
5757
ASSERT_EQ(ZE_RESULT_SUCCESS, zeInit(0));
58-
uint32_t pCount;
58+
uint32_t pCount = 0;
5959
ASSERT_EQ(ZE_RESULT_SUCCESS, zesDriverGet(&pCount, nullptr));
6060
ASSERT_GT(pCount, 0);
6161
}

0 commit comments

Comments
 (0)