OSDN Git Service

BQ: fix some uninitialized variables am: 93c617f
authorPablo Ceballos <pceballos@google.com>
Fri, 18 Mar 2016 20:33:20 +0000 (20:33 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Fri, 18 Mar 2016 20:33:20 +0000 (20:33 +0000)
am: f16b857

* commit 'f16b85752d7344814663c658175cce1a933e976b':
  BQ: fix some uninitialized variables

1  2 
libs/gui/IGraphicBufferConsumer.cpp
libs/gui/IGraphicBufferProducer.cpp

@@@ -343,26 -475,26 +343,26 @@@ status_t BnGraphicBufferConsumer::onTra
              status_t result = consumerDisconnect();
              reply->writeInt32(result);
              return NO_ERROR;
 -        } break;
 +        }
          case GET_RELEASED_BUFFERS: {
              CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
-             uint64_t slotMask;
+             uint64_t slotMask = 0;
              status_t result = getReleasedBuffers(&slotMask);
 -            reply->writeInt64(slotMask);
 +            reply->writeInt64(static_cast<int64_t>(slotMask));
              reply->writeInt32(result);
              return NO_ERROR;
 -        } break;
 +        }
          case SET_DEFAULT_BUFFER_SIZE: {
              CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
 -            uint32_t w = data.readInt32();
 -            uint32_t h = data.readInt32();
 -            status_t result = setDefaultBufferSize(w, h);
 +            uint32_t width = data.readUint32();
 +            uint32_t height = data.readUint32();
 +            status_t result = setDefaultBufferSize(width, height);
              reply->writeInt32(result);
              return NO_ERROR;
 -        } break;
 +        }
          case SET_DEFAULT_MAX_BUFFER_COUNT: {
              CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
 -            uint32_t bufferCount = data.readInt32();
 +            int bufferCount = data.readInt32();
              status_t result = setDefaultMaxBufferCount(bufferCount);
              reply->writeInt32(result);
              return NO_ERROR;
Simple merge