Mesa (master): r600g: Fix use of uninitialized local variable extra_size.

Michel Dänzer daenzer at kemper.freedesktop.org
Wed Jun 22 14:29:22 UTC 2011


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

Author: Michel Dänzer <daenzer at vmware.com>
Date:   Wed Jun 22 16:23:36 2011 +0200

r600g: Fix use of uninitialized local variable extra_size.

Should fix http://bugs.freedesktop.org/show_bug.cgi?id=38566 .

---

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

diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 8c98a5a..8e75d84 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -243,7 +243,7 @@ static void r600_setup_miptree(struct pipe_screen *screen,
 	struct radeon *radeon = (struct radeon *)screen->winsys;
 	enum chip_class chipc = r600_get_family_class(radeon);
 	unsigned size, layer_size, i, offset;
-	unsigned nblocksx, nblocksy, extra_size;
+	unsigned nblocksx, nblocksy, extra_size = 0;
 
 	for (i = 0, offset = 0; i <= ptex->last_level; i++) {
 		unsigned blocksize = util_format_get_blocksize(ptex->format);




More information about the mesa-commit mailing list