From 4f44d49925f2a1f6e4f34732dd10c431ddcdb379 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 10 Sep 2017 15:01:37 -0400 Subject: [PATCH] fix uninitialized variable --- src/analyze.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/analyze.cpp b/src/analyze.cpp index eaeb3fa55..bfc3bbfa7 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -326,10 +326,8 @@ TypeTableEntry *get_pointer_to_type_extra(CodeGen *g, TypeTableEntry *child_type TypeId type_id = {}; TypeTableEntry **parent_pointer = nullptr; - uint32_t abi_alignment; - if (unaligned_bit_count != 0 || is_volatile || - byte_alignment != (abi_alignment = get_abi_alignment(g, child_type))) - { + uint32_t abi_alignment = get_abi_alignment(g, child_type); + if (unaligned_bit_count != 0 || is_volatile || byte_alignment != abi_alignment) { type_id.id = TypeTableEntryIdPointer; type_id.data.pointer.child_type = child_type; type_id.data.pointer.is_const = is_const;