public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Committed]: avoid some uninitialized variable warnings
@ 2012-02-02 11:55 Tristan Gingold
  0 siblings, 0 replies; only message in thread
From: Tristan Gingold @ 2012-02-02 11:55 UTC (permalink / raw)
  To: binutils Development

Hi,

gcc 4.5.4 emits some 'uninitialized variable' warnings (that looks false) for two variables in mach-o area.  Fixed by this patch.

Tristan.

bfd/
2012-02-02  Tristan Gingold  <gingold@adacore.com>

	* mach-o.c (bfd_mach_o_read_header): Silent uninitialized
	variable warning.

gas/
2012-02-02  Tristan Gingold  <gingold@adacore.com>

	* config/obj-macho.c (obj_mach_o_zerofill): Silent
	uninitialized variable warning.

Index: bfd/mach-o.c
===================================================================
RCS file: /cvs/src/src/bfd/mach-o.c,v
retrieving revision 1.98
diff -c -r1.98 mach-o.c
*** bfd/mach-o.c	13 Jan 2012 12:59:29 -0000	1.98
--- bfd/mach-o.c	2 Feb 2012 11:46:46 -0000
***************
*** 2522,2527 ****
--- 2522,2529 ----
  
    if (mach_o_wide_p (header))
      header->reserved = (*get32) (raw.reserved);
+   else
+     header->reserved = 0;
  
    return TRUE;
  }

Index: gas/config/obj-macho.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-macho.c,v
retrieving revision 1.14
diff -c -r1.14 obj-macho.c
*** gas/config/obj-macho.c	13 Jan 2012 15:19:08 -0000	1.14
--- gas/config/obj-macho.c	2 Feb 2012 11:46:46 -0000
***************
*** 434,440 ****
    symbolS *sym = NULL;
    unsigned int align = 0;
    unsigned int specified_mask = 0;
!   offsetT size;
  
  #ifdef md_flush_pending_output
    md_flush_pending_output ();
--- 434,440 ----
    symbolS *sym = NULL;
    unsigned int align = 0;
    unsigned int specified_mask = 0;
!   offsetT size = 0;
  
  #ifdef md_flush_pending_output
    md_flush_pending_output ();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-02 11:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-02 11:55 [Committed]: avoid some uninitialized variable warnings Tristan Gingold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).