Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a036f37 authored by Andrei Homescu's avatar Andrei Homescu
Browse files

libbinder: Fix initializer order error in RpcState.cpp

Building with -Wreorder-init-list fails with an error in
RpcState.cpp when initializing a BinderNode structure.
This fixes the error by manually moving the initializers
in the right order.

Bug: None
Test: m

Change-Id: I81ca1f52ad0f6955f0a32658f8f367a3539baf06
parent bc8d5b48
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ cc_library {
        "-Wextra-semi",
        "-Werror",
        "-Wzero-as-null-pointer-constant",
        "-Wreorder-init-list",
        "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
        "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
    ],
+1 −1
Original line number Diff line number Diff line
@@ -125,8 +125,8 @@ status_t RpcState::onBinderLeaving(const sp<RpcSession>& session, const sp<IBind
        auto&& [it, inserted] = mNodeForAddress.insert({RpcWireAddress::toRaw(address),
                                                        BinderNode{
                                                                .binder = binder,
                                                                .timesSent = 1,
                                                                .sentRef = binder,
                                                                .timesSent = 1,
                                                        }});
        if (inserted) {
            *outAddress = it->first;