mesa: silence uninitialized var warning in get_tex_rgba_uncompressed()
authorBrian Paul <brianp@vmware.com>
Tue, 10 Feb 2015 19:17:18 +0000 (12:17 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 16 Feb 2015 15:33:28 +0000 (08:33 -0700)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/texgetimage.c

index 405f085342612fda39b2d7f18172529f26881d58..23cc3f06f07e423f45ad0aa2f81f4365d8bc1321 100644 (file)
@@ -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;