Module: vkd3d Branch: master Commit: dfea1abbd8eb4635fc722a9f605ec8e9ea69fa01 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/dfea1abbd8eb4635fc722a9f605ec8...
Author: Zebediah Figura zfigura@codeweavers.com Date: Fri Nov 24 17:25:21 2023 -0600
vkd3d-shader/hlsl: Avoid shadowing "jump" in normalize_switch_cases().
---
libs/vkd3d-shader/hlsl_codegen.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 6a7545da..88cbef61 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -2301,7 +2301,6 @@ static bool normalize_switch_cases(struct hlsl_ctx *ctx, struct hlsl_ir_node *in struct hlsl_ir_switch_case *c, *def = NULL; bool missing_terminal_break = false; struct hlsl_ir_node *node; - struct hlsl_ir_jump *jump; struct hlsl_ir_switch *s;
if (instr->type != HLSL_IR_SWITCH) @@ -2320,10 +2319,7 @@ static bool normalize_switch_cases(struct hlsl_ctx *ctx, struct hlsl_ir_node *in { node = LIST_ENTRY(list_tail(&c->body.instrs), struct hlsl_ir_node, entry); if (node->type == HLSL_IR_JUMP) - { - jump = hlsl_ir_jump(node); - terminal_break = jump->type == HLSL_IR_JUMP_BREAK; - } + terminal_break = (hlsl_ir_jump(node)->type == HLSL_IR_JUMP_BREAK); }
missing_terminal_break |= !terminal_break;