From bc7c89bc1fcff0854a88aeffa368720610d134a4 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Tue, 5 Apr 2022 12:33:06 +0200 Subject: [PATCH] vkd3d-shader/hlsl: Use an unsigned variable for iteration. Signed-off-by: Giovanni Mascellani Signed-off-by: Zebediah Figura Signed-off-by: Francisco Casas Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/hlsl_constant_ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d-shader/hlsl_constant_ops.c index 51cee179..109fc2ee 100644 --- a/libs/vkd3d-shader/hlsl_constant_ops.c +++ b/libs/vkd3d-shader/hlsl_constant_ops.c @@ -194,11 +194,12 @@ static bool fold_mul(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst, struct hlsl_ir_constant *src1, struct hlsl_ir_constant *src2) { enum hlsl_base_type type = dst->node.data_type->base_type; + unsigned int k; assert(type == src1->node.data_type->base_type); assert(type == src2->node.data_type->base_type); - for (int k = 0; k < 4; ++k) + for (k = 0; k < 4; ++k) { switch (type) {