ilo: Initialize read_back in transfer_map_sys.
authorVinson Lee <vlee@freedesktop.org>
Fri, 10 May 2013 05:42:10 +0000 (22:42 -0700)
committerChia-I Wu <olvaffe@gmail.com>
Fri, 10 May 2013 07:29:40 +0000 (15:29 +0800)
Fixes "Uninitialized scalar variable" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
src/gallium/drivers/ilo/ilo_resource.c

index c401d9f5f2b3ecfb811f4b0b217a7b2969304f1d..41e4ffb1a9bccbcac08e7a1c102d27ad0cd77a43 100644 (file)
@@ -340,7 +340,7 @@ transfer_map_sys(struct ilo_context *ilo,
    const size_t stride = util_format_get_stride(res->base.format, box->width);
    const size_t size =
       util_format_get_2d_size(res->base.format, stride, box->height);
-   bool read_back;
+   bool read_back = false;
 
    if (xfer->base.usage & PIPE_TRANSFER_READ) {
       read_back = true;