HWComposer: Remove unused variables and functions

For build-system CFLAGS clean-up, remove unused variables and
functions.

Bug: 18632512
Change-Id: Ie04cb2113efb4b544d674d16f3127c2468fae7c6
diff --git a/common/base/HwcLayerList.cpp b/common/base/HwcLayerList.cpp
index a6326fc..24aa5d6 100755
--- a/common/base/HwcLayerList.cpp
+++ b/common/base/HwcLayerList.cpp
@@ -114,7 +114,6 @@
 
 bool HwcLayerList::checkRgbOverlaySupported(HwcLayer *hwcLayer)
 {
-    bool valid = false;
     hwc_layer_1_t& layer = *(hwcLayer->getLayer());
 
     // if layer was forced to use FB
@@ -146,7 +145,6 @@
         return false;
     }
 
-    uint32_t h = hwcLayer->getBufferHeight();
     const stride_t& stride = hwcLayer->getBufferStride();
     if (stride.rgb.stride > 4096) {
         return false;
@@ -176,7 +174,6 @@
 
 bool HwcLayerList::checkCursorSupported(HwcLayer *hwcLayer)
 {
-    bool valid = false;
     hwc_layer_1_t& layer = *(hwcLayer->getLayer());
 
     // if layer was forced to use FB
@@ -260,7 +257,6 @@
     mOverlayCandidates.setCapacity(mLayerCount);
     mCursorCandidates.setCapacity(mLayerCount);
     mZOrderConfig.setCapacity(mLayerCount);
-    Hwcomposer& hwc = Hwcomposer::getInstance();
 
     PriorityVector rgbOverlayLayers;
     rgbOverlayLayers.setCapacity(mLayerCount);
@@ -798,8 +794,6 @@
 
 bool HwcLayerList::update(hwc_display_contents_1_t *list)
 {
-    bool ret;
-
     // basic check to make sure the consistance
     if (!list) {
         ELOGTRACE("null layer list");
diff --git a/common/base/HwcModule.cpp b/common/base/HwcModule.cpp
index ce8d478..152f8e4 100644
--- a/common/base/HwcModule.cpp
+++ b/common/base/HwcModule.cpp
@@ -124,19 +124,6 @@
     return 0;
 }
 
-static int hwc_blank(hwc_composer_device_1_t *dev, int disp, int blank)
-{
-    ATRACE_CALL();
-    GET_HWC_RETURN_ERROR_IF_NULL();
-    bool ret = hwc->blank(disp, blank);
-    if (ret == false) {
-        ELOGTRACE("failed to blank disp %d, blank %d", disp, blank);
-        return -EINVAL;
-    }
-
-    return 0;
-}
-
 static int hwc_getDisplayConfigs(hwc_composer_device_1_t *dev,
                                      int disp,
                                      uint32_t *configs,
@@ -222,6 +209,8 @@
     return 0;
 }
 
+// Todo: add hwc_setCursorPositionAsync after supporting patches
+/*
 static int hwc_setCursorPositionAsync(hwc_composer_device_1_t *dev, int disp, int x, int y)
 {
     ATRACE_CALL();
@@ -234,6 +223,7 @@
 
     return 0;
 }
+*/
 
 //------------------------------------------------------------------------------
 
diff --git a/ips/anniedale/AnnCursorPlane.cpp b/ips/anniedale/AnnCursorPlane.cpp
index e85a529..6280490 100644
--- a/ips/anniedale/AnnCursorPlane.cpp
+++ b/ips/anniedale/AnnCursorPlane.cpp
@@ -97,8 +97,6 @@
     // setup plane position
     int dstX = mPosition.x;
     int dstY = mPosition.y;
-    int dstW = mPosition.w;
-    int dstH = mPosition.h;
 
     if (h < w) {
         cursorSize = h;
@@ -148,7 +146,6 @@
     uint8_t *p = (uint8_t *)(mapper.getCpuAddress(0));
     uint8_t *srcPixel;
     uint32_t stride = mapper.getStride().rgb.stride;
-    uint8_t temp;
     if (!p) {
         return false;
     }
@@ -158,7 +155,6 @@
         for (int i = 0; i < cursorSize; i++) {
             for (int j = 0; j < cursorSize; j++) {
                 srcPixel = p + i*stride + j*4;
-                temp = srcPixel[0];
                 if (i >= mCrop.h || j >= mCrop.w) {
                     if (srcPixel[0] == 0 &&
                         srcPixel[3] == 0xff)
diff --git a/ips/anniedale/AnnOverlayPlane.cpp b/ips/anniedale/AnnOverlayPlane.cpp
index 8b63101..c10b630 100755
--- a/ips/anniedale/AnnOverlayPlane.cpp
+++ b/ips/anniedale/AnnOverlayPlane.cpp
@@ -227,7 +227,6 @@
 
     uint32_t yStride = mapper.getStride().yuv.yStride;
     uint32_t uvStride = mapper.getStride().yuv.uvStride;
-    uint32_t w = mapper.getWidth();
     uint32_t h = mapper.getHeight();
     uint32_t srcX= mapper.getCrop().x;
     uint32_t srcY= mapper.getCrop().y;
diff --git a/ips/anniedale/PlaneCapabilities.cpp b/ips/anniedale/PlaneCapabilities.cpp
index 736fff1..1856d4e 100755
--- a/ips/anniedale/PlaneCapabilities.cpp
+++ b/ips/anniedale/PlaneCapabilities.cpp
@@ -77,8 +77,6 @@
 bool PlaneCapabilities::isSizeSupported(int planeType, HwcLayer *hwcLayer)
 {
     uint32_t format = hwcLayer->getFormat();
-    uint32_t w = hwcLayer->getBufferWidth();
-    uint32_t h = hwcLayer->getBufferHeight();
     const stride_t& stride = hwcLayer->getBufferStride();
 
     bool isYUVPacked;
@@ -138,7 +136,6 @@
 bool PlaneCapabilities::isBlendingSupported(int planeType, HwcLayer *hwcLayer)
 {
     uint32_t blending = (uint32_t)hwcLayer->getLayer()->blending;
-    uint8_t planeAlpha = hwcLayer->getLayer()->planeAlpha;
 
     if (planeType == DisplayPlane::PLANE_SPRITE || planeType == DisplayPlane::PLANE_PRIMARY) {
         // support premultipled & none blanding
diff --git a/ips/common/OverlayPlaneBase.cpp b/ips/common/OverlayPlaneBase.cpp
index 2a41177..6ef76ae 100755
--- a/ips/common/OverlayPlaneBase.cpp
+++ b/ips/common/OverlayPlaneBase.cpp
@@ -345,9 +345,7 @@
     uint32_t yStride, uvStride;
     stride_t stride;
     int srcX, srcY, srcW, srcH;
-    int tmp;
 
-    DataBuffer *buf;
     ssize_t index;
     TTMBufferMapper *mapper;
     bool ret;
@@ -667,7 +665,6 @@
     uint32_t gttOffsetInBytes = (mapper.getGttOffsetInPage(0) << 12);
     uint32_t yStride = mapper.getStride().yuv.yStride;
     uint32_t uvStride = mapper.getStride().yuv.uvStride;
-    uint32_t w = mapper.getWidth();
     uint32_t h = mapper.getHeight();
     uint32_t srcX= mapper.getCrop().x;
     uint32_t srcY= mapper.getCrop().y;
diff --git a/ips/common/RotationBufferProvider.cpp b/ips/common/RotationBufferProvider.cpp
index 22fdf60..3c23b6b 100644
--- a/ips/common/RotationBufferProvider.cpp
+++ b/ips/common/RotationBufferProvider.cpp
@@ -380,7 +380,6 @@
     uint32_t setup_Begin = getMilliseconds();
 #endif
     VAStatus vaStatus;
-    int stride;
     bool ret = false;
 
     if (payload->format != VA_FOURCC_NV12 || payload->width == 0 || payload->height == 0) {
@@ -513,7 +512,7 @@
 
 bool RotationBufferProvider::prepareBufferInfo(int w, int h, int stride, VideoPayloadBuffer *payload, void *user_pt)
 {
-    int chroma_offset, size;
+    int size;
     void *buf = NULL;
 
     payload->width = payload->crop_width = w;
@@ -525,7 +524,6 @@
     payload->chroma_v_stride = stride;
     payload->client_transform = 0;
 
-    chroma_offset = stride * h;
     size = stride * h + stride * h / 2;
 
     ssize_t index;
diff --git a/ips/common/WsbmWrapper.c b/ips/common/WsbmWrapper.c
index 08ddefc..41ff986 100644
--- a/ips/common/WsbmWrapper.c
+++ b/ips/common/WsbmWrapper.c
@@ -156,7 +156,6 @@
 {
     struct _WsbmBufferObject * wsbmBuf = NULL;
     int ret = 0;
-    int offset = 0;
 
     ALOGTRACE("size %d", align_to(size, 4096));
 
@@ -195,7 +194,6 @@
 {
     struct _WsbmBufferObject * wsbmBuf = NULL;
     int ret = 0;
-    int offset = 0;
 
     ALOGTRACE("size %d", align_to(size, 4096));