[art] fix most -Wreorder-init-list
C++20 would like members of designated initializers to be ordered, so
that initialization side effects match member initialization in explicit
constructors. This differs from C99.
Fix all the cases, except for a tricky case in
tools/jvmti-agents/ti-fast/tifast.cc
where the macros
FOR_ALL_SUPPORTED_JNI_EVENTS
and
FOR_ALL_SUPPORTED_NO_JNI_EVENTS
are mixed in the macro
FOR_ALL_SUPPORTED_EVENTS.
This will be done in a follow up patch.
Bug: 139945549
Test: mm
Change-Id: Id2a0e8cdc960820ca72221050ba2a8a15e09342b
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
diff --git a/tools/jvmti-agents/field-null-percent/fieldnull.cc b/tools/jvmti-agents/field-null-percent/fieldnull.cc
index 8f5b389..016164f 100644
--- a/tools/jvmti-agents/field-null-percent/fieldnull.cc
+++ b/tools/jvmti-agents/field-null-percent/fieldnull.cc
@@ -178,8 +178,8 @@
CHECK_JVMTI(jvmti->AddCapabilities(&caps));
jvmtiEventCallbacks cb {
.VMInit = VMInitCb,
- .DataDumpRequest = DataDumpRequestCb,
.VMDeath = VMDeathCb,
+ .DataDumpRequest = DataDumpRequestCb,
};
CHECK_JVMTI(jvmti->SetEventCallbacks(&cb, sizeof(cb)));
if (is_onload) {