From 7d1f414103bb294d30cac8fecddff0b2ab694810 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 25 Apr 2012 15:49:45 +0100 Subject: [PATCH] gallivm: Move loop var declaration to beginning of scope. --- src/gallium/auxiliary/gallivm/lp_bld_printf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c b/src/gallium/auxiliary/gallivm/lp_bld_printf.c index 0d8d8065cb9..5aa802d9670 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c @@ -182,9 +182,11 @@ lp_build_print_uvec16(struct gallivm_state *gallivm, LLVMBuilderRef builder = gallivm->builder; char format[1000]; LLVMValueRef args[16]; + int i; - for(int i = 0; i < 16; ++i) + for (i = 0; i < 16; ++i) { args[i] = LLVMBuildExtractElement(builder, vec, lp_build_const_int32(gallivm, i), ""); + } util_snprintf(format, sizeof(format), "%s %%u %%u %%u %%u %%u %%u %%u %%u %%u %%u %%u %%u %%u %%u %%u %%u\n", msg); -- 2.30.2