Mesa (master): ilo: Initialize need_flush in draw_vbo.

Chia-I Wu olv at kemper.freedesktop.org
Thu May 23 07:32:09 UTC 2013


Module: Mesa
Branch: master
Commit: e3eeb72f2437c95ff92e4ef29afe2e6bad250c36
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3eeb72f2437c95ff92e4ef29afe2e6bad250c36

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Wed May 22 23:24:35 2013 -0700

ilo: Initialize need_flush in draw_vbo.

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>
Reviewed-by: Chia-I Wu <olvaffe at gmail.com>

---

 src/gallium/drivers/ilo/ilo_3d.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);




More information about the mesa-commit mailing list