Mesa (master): mesa: silence uninitialized var warning in get_tex_rgba_uncompressed()

Brian Paul brianp at kemper.freedesktop.org
Mon Feb 16 15:39:29 UTC 2015


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Feb 10 12:17:18 2015 -0700

mesa: silence uninitialized var warning in get_tex_rgba_uncompressed()

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/main/texgetimage.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 405f085..23cc3f0 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -450,7 +450,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
       if (transferOps) {
          uint32_t rgba_format;
          int rgba_stride;
-         bool need_convert;
+         bool need_convert = false;
 
          /* We will convert to RGBA float */
          rgba_format = RGBA32_FLOAT;
@@ -462,7 +462,6 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
           * buffer.
           */
          if (format == rgba_format) {
-            need_convert = false;
             rgba = dest;
          } else if (rgba == NULL) { /* Allocate the RGBA buffer only once */
             need_convert = true;




More information about the mesa-commit mailing list