23 May 2012 09:04
[PATCH v2] tgsi: Initialize Padding struct fields.
Vinson Lee <vlee <at> freedesktop.org>
2012-05-23 07:04:53 GMT
2012-05-23 07:04:53 GMT
Fix uninitialized scalar variable defects report by Coverity.
Signed-off-by: Vinson Lee <vlee <at> freedesktop.org>
---
src/gallium/auxiliary/tgsi/tgsi_build.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 1c24b9b..cb7b9b2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
<at> <at> -109,6 +109,7 <at> <at> tgsi_default_declaration( void )
declaration.Semantic = 0;
declaration.Invariant = 0;
declaration.Local = 0;
+ declaration.Padding = 0;
return declaration;
}
<at> <at> -199,6 +200,7 <at> <at> tgsi_default_declaration_interp( void )
di.Interpolate = TGSI_INTERPOLATE_CONSTANT;
di.Centroid = 0;
di.CylindricalWrap = 0;
+ di.Padding = 0;
return di;
}
<at> <at> -215,6 +217,7 <at> <at> tgsi_build_declaration_interp(unsigned interpolate,
di.Interpolate = interpolate;
di.Centroid = centroid;
di.CylindricalWrap = cylindrical_wrap;
+ di.Padding = 0;
declaration_grow(declaration, header);
<at> <at> -262,6 +265,7 <at> <at> tgsi_default_declaration_resource(void)
dr.Resource = TGSI_TEXTURE_BUFFER;
dr.Raw = 0;
dr.Writable = 0;
+ dr.Padding = 0;
return dr;
}
--
--
1.7.10.1
RSS Feed