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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user