[Mesa-dev] [PATCH] ilo: Initialize read_back in transfer_map_sys.

Chia-I Wu olvaffe at gmail.com
Fri May 10 00:32:51 PDT 2013


On Fri, May 10, 2013 at 1:42 PM, Vinson Lee <vlee at freedesktop.org> wrote:
> Fixes "Uninitialized scalar variable" defect reported by Coverity.
Committed, thanks.
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  src/gallium/drivers/ilo/ilo_resource.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/ilo/ilo_resource.c b/src/gallium/drivers/ilo/ilo_resource.c
> index c401d9f..41e4ffb 100644
> --- a/src/gallium/drivers/ilo/ilo_resource.c
> +++ b/src/gallium/drivers/ilo/ilo_resource.c
> @@ -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;
> --
> 1.8.2.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



--
olv at LunarG.com


More information about the mesa-dev mailing list