From 7398a5af38a9eead2ac6c87da876ba834b450519 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 8 Dec 2014 20:42:40 -0800 Subject: [PATCH] GUI: Remove unused variables For build-system CFLAGS clean-up, remove unused variables. Bug: 18632512 Change-Id: I79fdcf830683d7278f4bf114cfb76a26da1b88ff --- libs/gui/CpuConsumer.cpp | 1 - libs/gui/ISurfaceComposer.cpp | 2 -- libs/gui/Surface.cpp | 5 ++--- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index 45c896b40..d74d06c58 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -194,7 +194,6 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { status_t CpuConsumer::unlockBuffer(const LockedBuffer &nativeBuffer) { Mutex::Autolock _l(mMutex); size_t lockedIdx = 0; - status_t err; void *bufPtr = reinterpret_cast(nativeBuffer.data); for (; lockedIdx < static_cast(mMaxLockedBuffers); lockedIdx++) { diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index 36ddb13a6..78886d5bb 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -55,7 +55,6 @@ public: virtual sp createConnection() { - uint32_t n; Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); remote()->transact(BnSurfaceComposer::CREATE_CONNECTION, data, &reply); @@ -64,7 +63,6 @@ public: virtual sp createGraphicBufferAlloc() { - uint32_t n; Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); remote()->transact(BnSurfaceComposer::CREATE_GRAPHIC_BUFFER_ALLOC, data, &reply); diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index f1d2e91af..aa4aee4b2 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -96,8 +96,8 @@ void Surface::setSidebandStream(const sp& stream) { void Surface::allocateBuffers() { uint32_t reqWidth = mReqWidth ? mReqWidth : mUserWidth; uint32_t reqHeight = mReqHeight ? mReqHeight : mUserHeight; - mGraphicBufferProducer->allocateBuffers(mSwapIntervalZero, mReqWidth, - mReqHeight, mReqFormat, mReqUsage); + mGraphicBufferProducer->allocateBuffers(mSwapIntervalZero, reqWidth, + reqHeight, mReqFormat, mReqUsage); } int Surface::hook_setSwapInterval(ANativeWindow* window, int interval) { @@ -274,7 +274,6 @@ int Surface::cancelBuffer(android_native_buffer_t* buffer, int Surface::getSlotFromBufferLocked( android_native_buffer_t* buffer) const { - bool dumpedState = false; for (int i = 0; i < NUM_BUFFER_SLOTS; i++) { if (mSlots[i].buffer != NULL && mSlots[i].buffer->handle == buffer->handle) {