From facf03f2c394065666184d7d842e1488eaba355d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 2 Feb 2012 11:55:43 +0000 Subject: [PATCH] bfd/ 2012-02-02 Tristan Gingold * mach-o.c (bfd_mach_o_read_header): Silent uninitialized variable warning. gas/ 2012-02-02 Tristan Gingold * config/obj-macho.c (obj_mach_o_zerofill): Silent uninitialized variable warning. --- bfd/ChangeLog | 5 +++++ bfd/mach-o.c | 2 ++ gas/ChangeLog | 5 +++++ gas/config/obj-macho.c | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ad85fca5f9b..5efae574d9b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2012-02-02 Tristan Gingold + + * mach-o.c (bfd_mach_o_read_header): Silent uninitialized + variable warning. + 2012-02-02 Tristan Gingold * archive.c (bfd_slurp_armap): Fix thinko in cast. diff --git a/bfd/mach-o.c b/bfd/mach-o.c index a13ac4ea69d..5386b1ada14 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -2522,6 +2522,8 @@ bfd_mach_o_read_header (bfd *abfd, bfd_mach_o_header *header) if (mach_o_wide_p (header)) header->reserved = (*get32) (raw.reserved); + else + header->reserved = 0; return TRUE; } diff --git a/gas/ChangeLog b/gas/ChangeLog index f37e6b0e0fd..143667aedff 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2012-02-02 Tristan Gingold + + * config/obj-macho.c (obj_mach_o_zerofill): Silent + uninitialized variable warning. + 2012-02-02 Nick Clifton PR gas/13224 diff --git a/gas/config/obj-macho.c b/gas/config/obj-macho.c index f0cb43e115e..f4706ab03ed 100644 --- a/gas/config/obj-macho.c +++ b/gas/config/obj-macho.c @@ -434,7 +434,7 @@ obj_mach_o_zerofill (int ignore ATTRIBUTE_UNUSED) symbolS *sym = NULL; unsigned int align = 0; unsigned int specified_mask = 0; - offsetT size; + offsetT size = 0; #ifdef md_flush_pending_output md_flush_pending_output (); -- 2.30.2