From d0522a01dce003b49b2b1708f1fab1ae98f03379 Mon Sep 17 00:00:00 2001 From: Bellekallu Rajkiran Date: Mon, 8 Jul 2024 19:25:52 +0530 Subject: [PATCH] Initialize pCount to zero for zesDriverGet (#50) Signed-off-by: Bellekallu Rajkiran --- conformance_tests/sysman/test_sysman_init/src/test_init.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conformance_tests/sysman/test_sysman_init/src/test_init.cpp b/conformance_tests/sysman/test_sysman_init/src/test_init.cpp index b4cca8e2..62e70053 100644 --- a/conformance_tests/sysman/test_sysman_init/src/test_init.cpp +++ b/conformance_tests/sysman/test_sysman_init/src/test_init.cpp @@ -45,7 +45,7 @@ TEST(SysmanInitTests, TEST(SysmanInitTests, GivenCoreNotInitializedWhenSysmanInitializedThenzesDriverGetWorks) { ASSERT_EQ(ZE_RESULT_SUCCESS, zesInit(0)); - uint32_t pCount; + uint32_t pCount = 0; ASSERT_EQ(ZE_RESULT_SUCCESS, zesDriverGet(&pCount, nullptr)); ASSERT_GT(pCount, 0); } @@ -55,7 +55,7 @@ TEST(SysmanInitTests, static char sys_env[] = "ZES_ENABLE_SYSMAN=1"; putenv(sys_env); ASSERT_EQ(ZE_RESULT_SUCCESS, zeInit(0)); - uint32_t pCount; + uint32_t pCount = 0; ASSERT_EQ(ZE_RESULT_SUCCESS, zesDriverGet(&pCount, nullptr)); ASSERT_GT(pCount, 0); }