[PATCH] Dwarf: fix build with old gcc
Alan Modra
amodra@gmail.com
Tue Feb 16 01:18:50 GMT 2021
On Mon, Feb 15, 2021 at 12:07:20PM +0100, Jan Beulich via Binutils wrote:
> 4.3-ish warns about a possibly uninitialized variable, which results in
> a build failure due to -Werror.
>
> binutils/
> 2021-02-15 Jan Beulich <jbeulich@suse.com>
>
> * dwarf.c (process_debug_info): Initialize "dwo_id".
OK.
>
> --- a/binutils/dwarf.c
> +++ b/binutils/dwarf.c
> @@ -3693,7 +3693,7 @@ process_debug_info (struct dwarf_section
> SAFE_BYTE_GET_AND_INC (compunit.cu_pointer_size, hdrptr, 1, end);
>
> bfd_boolean do_dwo_id = FALSE;
> - uint64_t dwo_id;
> + uint64_t dwo_id = 0;
> if (compunit.cu_unit_type == DW_UT_split_compile
> || compunit.cu_unit_type == DW_UT_skeleton)
> {
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list