diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp index 2118c9234..8bdbc22ec 100644 --- a/libs/gui/IGraphicBufferProducer.cpp +++ b/libs/gui/IGraphicBufferProducer.cpp @@ -348,7 +348,7 @@ status_t BnGraphicBufferProducer::onTransact( uint32_t height = data.readUint32(); PixelFormat format = static_cast(data.readInt32()); uint32_t usage = data.readUint32(); - int buf; + int buf = 0; sp fence; int result = dequeueBuffer(&buf, &fence, async, width, height, format, usage); @@ -416,7 +416,7 @@ status_t BnGraphicBufferProducer::onTransact( } case QUERY: { CHECK_INTERFACE(IGraphicBufferProducer, data, reply); - int value; + int value = 0; int what = data.readInt32(); int res = query(what, &value); reply->writeInt32(value);