glsl: silence a couple warnings in find_active_atomic_counters()
authorBrian Paul <brianp@vmware.com>
Wed, 22 Jan 2014 18:03:15 +0000 (10:03 -0800)
committerBrian Paul <brianp@vmware.com>
Thu, 23 Jan 2014 15:13:14 +0000 (08:13 -0700)
Silence unitialized variable 'id' warning.  Silence unused 'found' warning.
Only seen in release builds.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/glsl/link_atomics.cpp

index db9c53965624fa841aa455835b29349643e0b1ec..d92cdb1170999520f810153a8024ce4d0280511c 100644 (file)
@@ -105,9 +105,10 @@ namespace {
             ir_variable *var = ((ir_instruction *)node)->as_variable();
 
             if (var && var->type->contains_atomic()) {
-               unsigned id;
+               unsigned id = 0;
                bool found = prog->UniformHash->get(id, var->name);
                assert(found);
+               (void) found;
                active_atomic_buffer *buf = &buffers[var->data.binding];
 
                /* If this is the first time the buffer is used, increment