[nativewindow] fix -Wreorder-init-list
C++20 will require members in a designated initializer to be in order
unlike C99.
Bug: 139945549
Test: mm
Change-Id: I9af163a79aa97f3b1a7e423614a82c920a09ab17
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
diff --git a/libs/nativewindow/AHardwareBuffer.cpp b/libs/nativewindow/AHardwareBuffer.cpp
index 9bd3095..1ec73ce 100644
--- a/libs/nativewindow/AHardwareBuffer.cpp
+++ b/libs/nativewindow/AHardwareBuffer.cpp
@@ -266,10 +266,10 @@
char buf[CMSG_SPACE(kFdBufferSize)];
struct msghdr msg = {
- .msg_control = buf,
- .msg_controllen = sizeof(buf),
.msg_iov = &iov[0],
.msg_iovlen = 1,
+ .msg_control = buf,
+ .msg_controllen = sizeof(buf),
};
struct cmsghdr* cmsg = CMSG_FIRSTHDR(&msg);
@@ -306,10 +306,10 @@
iov[0].iov_len = kMessageBufferSize;
struct msghdr msg = {
- .msg_control = fdBuf,
- .msg_controllen = sizeof(fdBuf),
.msg_iov = &iov[0],
.msg_iovlen = 1,
+ .msg_control = fdBuf,
+ .msg_controllen = sizeof(fdBuf),
};
int result;