Use memset for initializing variable sized array

In ASAN builds, the compiler used is clang. The initialization of
variable sized array using assignment operator is causing compilation
failure in ASAN builds. Used memset to fix the same.

Change-Id: I02aef3b99a6cad0cce3a378210a48732e07a88fb
Этот коммит содержится в:
Ranjith Ramakrishnan
2023-08-21 11:23:08 -07:00
родитель a3f8085025
Коммит 65911e8368
+2 -1
Просмотреть файл
@@ -441,7 +441,8 @@ TEST_F(KFDDBGTest, SuspendQueues) {
uint32_t NumQueues = 1;
uint32_t QueueIds[NumQueues];
struct kfd_queue_snapshot_entry Snapshots[NumQueues] = {0};
struct kfd_queue_snapshot_entry Snapshots[NumQueues];
memset(Snapshots, 0, NumQueues * sizeof(struct kfd_queue_snapshot_entry));
ASSERT_SUCCESS(debug->SuspendQueues(&NumQueues, Queues, &QueueIds[0], 0));
// Suspend should fail as new queues cannot be suspended