Fix a possibly uninitialized variable

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-06-28 17:27:02 +02:00
parent 9e7143d934
commit 5348708da4

4
ir.c
View file

@ -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];