tgsi: Ensure struct tgsi_ind_register field Index is initialized.
authorVinson Lee <vlee@freedesktop.org>
Sat, 6 Apr 2013 03:46:30 +0000 (20:46 -0700)
committerVinson Lee <vlee@freedesktop.org>
Tue, 9 Apr 2013 01:59:34 +0000 (18:59 -0700)
Fixes uninitialized scalar variable defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_build.c

index 509bc5c1241d6f0a462e185a32b20c412325b176..523430b3ca79b1e6b172fe0a3abedcca0f64750c 100644 (file)
@@ -835,6 +835,7 @@ tgsi_default_ind_register( void )
    struct tgsi_ind_register ind_register;
 
    ind_register.File = TGSI_FILE_NULL;
+   ind_register.Index = 0;
    ind_register.Swizzle = TGSI_SWIZZLE_X;
    ind_register.ArrayID = 0;