diff options
author | 2014-11-18 10:24:03 -0800 | |
---|---|---|
committer | 2014-12-05 11:06:44 -0800 | |
commit | d723bd7669b4fc88dc282d8bf8ba5ecb2849d22f (patch) | |
tree | efc2d81e4ebf1f2499c5c5ec10323c6b3013a5ba /libs/gui/IDisplayEventConnection.cpp | |
parent | a950eb18792da6962fcefa69b12ffc3f9d8cdca8 (diff) |
libgui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.
Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
Diffstat (limited to 'libs/gui/IDisplayEventConnection.cpp')
-rw-r--r-- | libs/gui/IDisplayEventConnection.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/gui/IDisplayEventConnection.cpp b/libs/gui/IDisplayEventConnection.cpp index 887d176b44..9890f44ef7 100644 --- a/libs/gui/IDisplayEventConnection.cpp +++ b/libs/gui/IDisplayEventConnection.cpp @@ -44,6 +44,8 @@ public: { } + virtual ~BpDisplayEventConnection(); + virtual sp<BitTube> getDataChannel() const { Parcel data, reply; @@ -55,7 +57,7 @@ public: virtual void setVsyncRate(uint32_t count) { Parcel data, reply; data.writeInterfaceToken(IDisplayEventConnection::getInterfaceDescriptor()); - data.writeInt32(count); + data.writeUint32(count); remote()->transact(SET_VSYNC_RATE, data, &reply); } @@ -66,6 +68,10 @@ public: } }; +// Out-of-line virtual method definition to trigger vtable emission in this +// translation unit (see clang warning -Wweak-vtables) +BpDisplayEventConnection::~BpDisplayEventConnection() {} + IMPLEMENT_META_INTERFACE(DisplayEventConnection, "android.gui.DisplayEventConnection"); // ---------------------------------------------------------------------------- @@ -79,17 +85,17 @@ status_t BnDisplayEventConnection::onTransact( sp<BitTube> channel(getDataChannel()); channel->writeToParcel(reply); return NO_ERROR; - } break; + } case SET_VSYNC_RATE: { CHECK_INTERFACE(IDisplayEventConnection, data, reply); - setVsyncRate(data.readInt32()); + setVsyncRate(data.readUint32()); return NO_ERROR; - } break; + } case REQUEST_NEXT_VSYNC: { CHECK_INTERFACE(IDisplayEventConnection, data, reply); requestNextVsync(); return NO_ERROR; - } break; + } } return BBinder::onTransact(code, data, reply, flags); } |