From 2d1825bb893b3280259ca70c3a2a384a9b302454 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sun, 30 Apr 2023 17:40:32 -0500 Subject: [PATCH] vkd3d-shader/hlsl: Remove an unnecessary local variable in copy_propagation_get_value(). Found with -Wshadow. --- libs/vkd3d-shader/hlsl_codegen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 294a8156..628de796 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -1304,12 +1304,10 @@ static struct copy_propagation_value *copy_propagation_get_value(const struct co { struct copy_propagation_var_def *var_def = RB_ENTRY_VALUE(entry, struct copy_propagation_var_def, entry); unsigned int component_count = hlsl_type_component_count(var->data_type); - enum copy_propagation_value_state state; assert(component < component_count); - state = var_def->values[component].state; - switch (state) + switch (var_def->values[component].state) { case VALUE_STATE_STATICALLY_WRITTEN: return &var_def->values[component];