mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 06:50:10 +01:00
glsl: fix compiler warnings in link_uniforms.cpp
With a non-debug build, gcc has two complaints: 1. 'found' var not used. Silence with '(void) found;' 2. 'id' not initialized. It's assigned by the UniformHash->get() call, actually. But init it to zero to silence gcc. Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
3649800009
commit
ef8a19ed4f
1 changed files with 2 additions and 1 deletions
|
|
@ -775,9 +775,10 @@ link_set_image_access_qualifiers(struct gl_shader_program *prog)
|
|||
|
||||
if (var && var->data.mode == ir_var_uniform &&
|
||||
var->type->contains_image()) {
|
||||
unsigned id;
|
||||
unsigned id = 0;
|
||||
bool found = prog->UniformHash->get(id, var->name);
|
||||
assert(found);
|
||||
(void) found;
|
||||
const gl_uniform_storage *storage = &prog->UniformStorage[id];
|
||||
const unsigned index = storage->image[i].index;
|
||||
const GLenum access = (var->data.image.read_only ? GL_READ_ONLY :
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue