dev-amdgpu: Add braces to stop clang compilation braces error

Additional braces are needed due to a clang compilation bug that falsely
throws a "suggest braces around initialization of subject" error. More
info on this bug is available here:
https://stackoverflow.com/questions/31555584

Change-Id: Ide5cdd260716ba06f6da4663732e39d18e00af97
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58150
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2022-03-24 16:03:49 -07:00
committed by Bobby Bruce
parent d63c640775
commit ea9b7ef6a2

View File

@@ -166,7 +166,12 @@ PM4PacketProcessor::decodeNext(PM4Queue *q)
q->id(), q->rptr(), q->wptr());
if (q->rptr() < q->wptr()) {
PM4Header h{0, 0, 0, 0, 0, 0};
/* Additional braces here are needed due to a clang compilation bug
falsely throwing a "suggest braces around initialization of
subject" error. More info on this bug is available here:
https://stackoverflow.com/questions/31555584
*/
PM4Header h{{{0, 0, 0, 0, 0, 0}}};
auto cb = new DmaVirtCallback<PM4Header>(
[ = ] (PM4Header header)
{ decodeHeader(q, header); }, h);