From e9c93a714a5fcf2206a7904cb2c64f924ab53905 Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Mon, 4 Dec 2023 11:53:26 -0800 Subject: Fix Binder warnings after C++ bump to 20 Bug: 311052584 Test: mma in binder folder Change-Id: I716613dbdbf4b58b128106b893d051995bcc9d4a --- libs/binder/ndk/include_platform/android/binder_stability.h | 12 +++++------- libs/binder/tests/binderRpcTestCommon.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'libs') diff --git a/libs/binder/ndk/include_platform/android/binder_stability.h b/libs/binder/ndk/include_platform/android/binder_stability.h index c1f62e58e9..089c775eca 100644 --- a/libs/binder/ndk/include_platform/android/binder_stability.h +++ b/libs/binder/ndk/include_platform/android/binder_stability.h @@ -21,17 +21,15 @@ __BEGIN_DECLS /** - * Private addition to binder_flag_t. + * Indicates that this transaction is coupled w/ vendor.img */ -enum { - /** - * Indicates that this transaction is coupled w/ vendor.img - */ - FLAG_PRIVATE_VENDOR = 0x10000000, -}; +constexpr binder_flags_t FLAG_PRIVATE_VENDOR = 0x10000000; #if defined(__ANDROID_VENDOR__) +/** + * Private addition to binder_flag_t. + */ enum { FLAG_PRIVATE_LOCAL = FLAG_PRIVATE_VENDOR, }; diff --git a/libs/binder/tests/binderRpcTestCommon.h b/libs/binder/tests/binderRpcTestCommon.h index a55edd273e..62fe9e56f6 100644 --- a/libs/binder/tests/binderRpcTestCommon.h +++ b/libs/binder/tests/binderRpcTestCommon.h @@ -393,7 +393,7 @@ public: } if (delayed) { - RpcMaybeThread([=]() { + RpcMaybeThread([=, this]() { ALOGE("Executing delayed callback: '%s'", value.c_str()); Status status = doCallback(callback, oneway, false, value); ALOGE("Delayed callback status: '%s'", status.toString8().c_str()); -- cgit v1.2.3-59-g8ed1b