summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-02-16 17:10:35 -0700
committerBrian Paul <[email protected]>2011-02-16 17:10:36 -0700
commit5d236d71c84075d79349218be7b427366bc7406b (patch)
tree06a145dca207401f37092a957d5a760db69fe4c7
parentc8f8d7d873269bd2e01f088725f754f9413102b5 (diff)
gallium/util: init key with memset()
To silence missing initializers warning.
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index 5f5a554e331..7add88e529d 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -154,7 +154,7 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr,
int min_index, int max_index,
boolean *upload_flushed)
{
- struct translate_key key = {0};
+ struct translate_key key;
struct translate_element *te;
unsigned tr_elem_index[PIPE_MAX_ATTRIBS] = {0};
struct translate *tr;
@@ -165,6 +165,8 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr,
unsigned i, num_verts, out_offset;
struct pipe_vertex_element new_velems[PIPE_MAX_ATTRIBS];
+ memset(&key, 0, sizeof(key));
+
/* Initialize the translate key, i.e. the recipe how vertices should be
* translated. */
for (i = 0; i < mgr->ve->count; i++) {