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

Commit b86c8662 authored by Jiyong Park's avatar Jiyong Park
Browse files

Suppress lint warnings on google-default-arguments

The lint rule google-default-arguments ensures that virtual or override
methods do not have default arguments, because different default values
across the hierarchy chain (e.g. Base::foo(int a=0) v.s.
Derived::foo(int a=10)) can cause confusions.

However, since the uses of the default arguments in libbinder don't lead
to such problem, suppress the warnings.

Test: WITH_TIDY=true WITH_TIDY_CHECKS=google-default-arguments m
libbinder does not show any warning about google-default-arguments

Change-Id: I90f6d05a9dc3232d0c63563df18a582432b83574
parent 8bae3798
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ const String16& BBinder::getInterfaceDescriptor() const
    return sEmptyDescriptor;
}

// NOLINTNEXTLINE(google-default-arguments)
status_t BBinder::transact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
@@ -137,6 +138,7 @@ status_t BBinder::transact(
    return err;
}

// NOLINTNEXTLINE(google-default-arguments)
status_t BBinder::linkToDeath(
    const sp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
    uint32_t /*flags*/)
@@ -144,6 +146,7 @@ status_t BBinder::linkToDeath(
    return INVALID_OPERATION;
}

// NOLINTNEXTLINE(google-default-arguments)
status_t BBinder::unlinkToDeath(
    const wp<DeathRecipient>& /*recipient*/, void* /*cookie*/,
    uint32_t /*flags*/, wp<DeathRecipient>* /*outRecipient*/)
@@ -208,6 +211,7 @@ BBinder::~BBinder()
}


// NOLINTNEXTLINE(google-default-arguments)
status_t BBinder::onTransact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t /*flags*/)
{
+3 −0
Original line number Diff line number Diff line
@@ -206,6 +206,7 @@ status_t BpBinder::dump(int fd, const Vector<String16>& args)
    return err;
}

// NOLINTNEXTLINE(google-default-arguments)
status_t BpBinder::transact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
@@ -220,6 +221,7 @@ status_t BpBinder::transact(
    return DEAD_OBJECT;
}

// NOLINTNEXTLINE(google-default-arguments)
status_t BpBinder::linkToDeath(
    const sp<DeathRecipient>& recipient, void* cookie, uint32_t flags)
{
@@ -254,6 +256,7 @@ status_t BpBinder::linkToDeath(
    return DEAD_OBJECT;
}

// NOLINTNEXTLINE(google-default-arguments)
status_t BpBinder::unlinkToDeath(
    const wp<DeathRecipient>& recipient, void* cookie, uint32_t flags,
    wp<DeathRecipient>* outRecipient)
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ IMPLEMENT_META_INTERFACE(AppOpsCallback, "com.android.internal.app.IAppOpsCallba

// ----------------------------------------------------------------------

// NOLINTNEXTLINE(google-default-arguments)
status_t BnAppOpsCallback::onTransact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
+1 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ IMPLEMENT_META_INTERFACE(AppOpsService, "com.android.internal.app.IAppOpsService

// ----------------------------------------------------------------------

// NOLINTNEXTLINE(google-default-arguments)
status_t BnAppOpsService::onTransact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ IMPLEMENT_META_INTERFACE(BatteryStats, "com.android.internal.app.IBatteryStats")

// ----------------------------------------------------------------------

// NOLINTNEXTLINE(google-default-arguments)
status_t BnBatteryStats::onTransact(
    uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
Loading