diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/get.c | 2 | ||||
-rw-r--r-- | src/mesa/main/texcompress_s3tc_tmp.h | 2 | ||||
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 261eaf37323..8325786a396 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1548,6 +1548,8 @@ find_value(const char *func, GLenum pname, void **p, union value *v) const struct value_desc *d; int api; + *p = NULL; + api = ctx->API; /* We index into the table_set[] list of per-API hash tables using the API's * value in the gl_api enum. Since GLES 3 doesn't have an API_OPENGL* enum diff --git a/src/mesa/main/texcompress_s3tc_tmp.h b/src/mesa/main/texcompress_s3tc_tmp.h index 904c6765261..5dd25222f15 100644 --- a/src/mesa/main/texcompress_s3tc_tmp.h +++ b/src/mesa/main/texcompress_s3tc_tmp.h @@ -197,7 +197,7 @@ static void fancybasecolorsearch( UNUSED GLubyte *blkaddr, GLubyte srccolors[4][ GLuint pixerror, pixerrorred, pixerrorgreen, pixerrorblue, pixerrorbest; GLint colordist, blockerrlin[2][3]; GLubyte nrcolor[2]; - GLint pixerrorcolorbest[3]; + GLint pixerrorcolorbest[3] = {0}; GLubyte enc = 0; GLubyte cv[4][4]; GLubyte testcolor[2][3]; diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 2bf01098db9..4cd9abb9ce3 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -1367,7 +1367,7 @@ ir_to_mesa_visitor::visit(ir_swizzle *ir) { src_reg src; int i; - int swizzle[4]; + int swizzle[4] = {0}; /* Note that this is only swizzles in expressions, not those on the left * hand side of an assignment, which do write masking. See ir_assignment @@ -2420,8 +2420,8 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name, * This avoids relying on names to match parameters and uniform * storages later when associating uniform storage. */ - unsigned location; - const bool found = + unsigned location = -1; + ASSERTED const bool found = shader_program->UniformHash->get(location, params->Parameters[index].Name); assert(found); diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index ae20092c498..952327a3b20 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2410,7 +2410,7 @@ glsl_to_tgsi_visitor::visit(ir_swizzle *ir) { st_src_reg src; int i; - int swizzle[4]; + int swizzle[4] = {0}; /* Note that this is only swizzles in expressions, not those on the left * hand side of an assignment, which do write masking. See ir_assignment |