mesa: fix 11 warnings

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3970>
This commit is contained in:
Marek Olšák
2020-02-26 17:21:43 -05:00
parent 6d7b076166
commit ad192385e3
4 changed files with 7 additions and 5 deletions
+2
View File
@@ -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
+1 -1
View File
@@ -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];
+3 -3
View File
@@ -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);
+1 -1
View File
@@ -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