summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-03-05 16:39:59 -0700
committerBrian Paul <brianp@vmware.com>2014-03-06 07:45:36 -0700
commitef8a19ed4facf9769e1da1cbb9e741df23893ed5 (patch)
treeaf8692cfec0d144db2cf0db168cd8b8294dfd003 /src/glsl/link_uniforms.cpp
parent3649800009bffc7787f08c32cfee355b8e874b20 (diff)
downloadexternal_mesa3d-ef8a19ed4facf9769e1da1cbb9e741df23893ed5.zip
external_mesa3d-ef8a19ed4facf9769e1da1cbb9e741df23893ed5.tar.gz
external_mesa3d-ef8a19ed4facf9769e1da1cbb9e741df23893ed5.tar.bz2
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>
Diffstat (limited to 'src/glsl/link_uniforms.cpp')
-rw-r--r--src/glsl/link_uniforms.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 1cf376d..1c451e7 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -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 :