diff options
| author | 2019-11-19 09:31:05 -0800 | |
|---|---|---|
| committer | 2019-11-19 09:31:05 -0800 | |
| commit | 54891cd71acf7ce39a827a58d812d2967e4b7efc (patch) | |
| tree | d9f425662aaff7f55bb611af2fbff61f77f4ff43 | |
| parent | cca0f3c899d3e8a762180e01e116c7243c94feb9 (diff) | |
frameworks: native: fix -Wreorder-init-list
C++20 will require members in a designated initializer to be in order
unlike C99.
Bug: 139945549
Test: lunch flame-userdebug && mm
Change-Id: I1cad2ea2ce1008acd908988b0799e50457bba032
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
| -rw-r--r-- | libs/binder/tests/binderLibTest.cpp | 2 | ||||
| -rw-r--r-- | libs/cputimeinstate/cputimeinstate.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp index db4a36b16b..94ab9f0905 100644 --- a/libs/binder/tests/binderLibTest.cpp +++ b/libs/binder/tests/binderLibTest.cpp @@ -1034,9 +1034,9 @@ TEST_F(BinderLibTest, BufRejected) { binder_buffer_object obj { .hdr = { .type = BINDER_TYPE_PTR }, + .flags = 0, .buffer = reinterpret_cast<binder_uintptr_t>((void*)&buf), .length = 4, - .flags = 0, }; data.setDataCapacity(1024); // Write a bogus object at offset 0 to get an entry in the offset table diff --git a/libs/cputimeinstate/cputimeinstate.cpp b/libs/cputimeinstate/cputimeinstate.cpp index 45fea850aa..4ee9f55227 100644 --- a/libs/cputimeinstate/cputimeinstate.cpp +++ b/libs/cputimeinstate/cputimeinstate.cpp @@ -397,7 +397,7 @@ bool clearUidTimes(uint32_t uid) { if (deleteMapEntry(gTisMapFd, &key) && errno != ENOENT) return false; } - concurrent_val_t czeros = {.policy = {0}, .active = {0}}; + concurrent_val_t czeros = { .active = {0}, .policy = {0}, }; std::vector<concurrent_val_t> cvals(gNCpus, czeros); for (key.bucket = 0; key.bucket <= (gNCpus - 1) / CPUS_PER_ENTRY; ++key.bucket) { if (writeToMapEntry(gConcurrentMapFd, &key, cvals.data(), BPF_EXIST) && errno != ENOENT) |