Fix weak vtable warnings
Move virtual destructors into cpp file so that the compiler knows which
translation unit to put the vtable into. Hide the warning for
DeathRecipient, which has no virtual methods to move. The warnings were
being hidden by the use of -isystem to include
frameworks/native/include.
Bug: 31752268
Test: m -j
Change-Id: I25329d66bfc1f6a5064d05ce7d12ad9b090601f8
diff --git a/include/binder/Parcelable.h b/include/binder/Parcelable.h
index faf0d34..d5b57ac 100644
--- a/include/binder/Parcelable.h
+++ b/include/binder/Parcelable.h
@@ -26,6 +26,11 @@
class Parcel;
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
+
// Abstract interface of all parcelables.
class Parcelable {
public:
@@ -46,6 +51,10 @@
virtual status_t readFromParcel(const Parcel* parcel) = 0;
}; // class Parcelable
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
} // namespace android
#endif // ANDROID_PARCELABLE_H