diff options
author | Brian Paul <[email protected]> | 2019-05-20 07:33:14 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2019-05-29 13:59:24 -0600 |
commit | e584fd894ed1b4497d668f7145c8514914d6ad8f (patch) | |
tree | 6fdfcb2746c766238b864da897f600ce0d7d71bd /src/compiler/nir | |
parent | c71ca65405e677ac65d176cd4d6138923df6cd56 (diff) |
nir: silence three compiler warnings seen with MinGW
Silence two unused var warnings. And init elem_size, elem_align to
zero to silence "maybe uninitialized" warnings.
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_lower_int_to_float.c | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_copy_prop_vars.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_int_to_float.c b/src/compiler/nir/nir_lower_int_to_float.c index e31644d8cf7..d0da60c925b 100644 --- a/src/compiler/nir/nir_lower_int_to_float.c +++ b/src/compiler/nir/nir_lower_int_to_float.c @@ -28,7 +28,7 @@ static bool assert_ssa_def_is_not_int(nir_ssa_def *def, void *arg) { - BITSET_WORD *int_types = arg; + MAYBE_UNUSED BITSET_WORD *int_types = arg; assert(!BITSET_TEST(int_types, def->index)); return true; } diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c index 94bc8affd9e..0fd96b7bee8 100644 --- a/src/compiler/nir/nir_opt_copy_prop_vars.c +++ b/src/compiler/nir/nir_opt_copy_prop_vars.c @@ -433,9 +433,7 @@ load_element_from_ssa_entry_value(struct copy_prop_var_state *state, nir_builder *b, nir_intrinsic_instr *intrin, struct value *value, unsigned index) { - const struct glsl_type *type = entry->dst->type; - unsigned num_components = glsl_get_vector_elements(type); - assert(index < num_components); + assert(index < glsl_get_vector_elements(entry->dst->type)); /* We don't have the element available, so let the instruction do the work. */ if (!entry->src.ssa.def[index]) |