From 5348708da4adccc0613d428c6d43a6a1ecebfce1 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Thu, 28 Jun 2012 17:27:02 +0200 Subject: [PATCH] Fix a possibly uninitialized variable --- ir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ir.c b/ir.c index 74363f8..e05f4d7 100644 --- a/ir.c +++ b/ir.c @@ -1665,6 +1665,10 @@ bool ir_function_allocate_locals(ir_function *self) if (!function_allocator_positions_add(&alloc, 0)) goto error; + if (alloc.sizes_count) + pos = alloc.positions[0] + alloc.sizes[0]; + else + pos = 0; for (i = 1; i < alloc.sizes_count; ++i) { pos = alloc.positions[i-1] + alloc.sizes[i-1];