authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-10 15:01:37-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-10 15:01:37-04:00
log4f44d49925f2a1f6e4f34732dd10c431ddcdb379
treee346b50973de307263447d2ab6fa52d2cb8fccd1
parent011df61f8a2a138e8023f7c89239f187c2dd4316

fix uninitialized variable


1 files changed, 2 insertions(+), 4 deletions(-)

src/analyze.cpp+2-4
......@@ -326,10 +326,8 @@ TypeTableEntry *get_pointer_to_type_extra(CodeGen *g, TypeTableEntry *child_type
326326
327327 TypeId type_id = {};
328328 TypeTableEntry **parent_pointer = nullptr;
329 uint32_t abi_alignment;
330 if (unaligned_bit_count != 0 || is_volatile ||
331 byte_alignment != (abi_alignment = get_abi_alignment(g, child_type)))
332 {
329 uint32_t abi_alignment = get_abi_alignment(g, child_type);
330 if (unaligned_bit_count != 0 || is_volatile || byte_alignment != abi_alignment) {
333331 type_id.id = TypeTableEntryIdPointer;
334332 type_id.data.pointer.child_type = child_type;
335333 type_id.data.pointer.is_const = is_const;