[Mesa-dev] [PATCH] ilo: Initialize need_flush in draw_vbo.

Chia-I Wu olvaffe at gmail.com
Thu May 23 00:32:47 PDT 2013


On Thu, May 23, 2013 at 2:24 PM, Vinson Lee <vlee at freedesktop.org> wrote:
> need_flush was uninitialized if hw3d->new_batch was true.
>
> Fixes "Uninitialized scalar variable" defect reported by Coverity.
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Applied, thanks.  Now I wonder why gcc did not give me any warning...
> ---
>  src/gallium/drivers/ilo/ilo_3d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c
> index 980bdb4..ba3fa96 100644
> --- a/src/gallium/drivers/ilo/ilo_3d.c
> +++ b/src/gallium/drivers/ilo/ilo_3d.c
> @@ -371,7 +371,7 @@ draw_vbo(struct ilo_3d *hw3d, const struct ilo_context *ilo,
>           const struct pipe_draw_info *info,
>           int *prim_generated, int *prim_emitted)
>  {
> -   bool need_flush;
> +   bool need_flush = false;
>     int max_len;
>
>     ilo_3d_own_render_ring(hw3d);
> --
> 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