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


[ROCm/ROCR-Runtime commit: 65911e8368]
此提交包含在:
Ranjith Ramakrishnan
2023-08-21 11:23:08 -07:00
父節點 9bcc4bafdf
當前提交 245c5e2a40
+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