ilo: fix a -Wmaybe-uninitialized warning
authorChia-I Wu <olvaffe@gmail.com>
Fri, 19 Jun 2015 15:24:17 +0000 (23:24 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 20 Jun 2015 03:13:20 +0000 (11:13 +0800)
ilo_shader.c: In function ‘ilo_shader_select_kernel_sbe’:
ilo_shader.c:1140:27: warning: ‘src_skip’ may be used uninitialized in this
function [-Wmaybe-uninitialized]

src/gallium/drivers/ilo/ilo_shader.c

index 93a26268a2955af34db7709f8c6a94ec7b3b1bf2..5f2b01017e23da1215be155e57e7a1b1373ff56a 100644 (file)
@@ -1089,6 +1089,7 @@ ilo_shader_select_kernel_sbe(struct ilo_shader_state *shader,
       src_semantics = source->shader->out.semantic_names;
       src_indices = source->shader->out.semantic_indices;
       src_len = source->shader->out.count;
+      src_skip = 0;
 
       assert(src_len >= 2 &&
              src_semantics[0] == TGSI_SEMANTIC_PSIZE &&