This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed]: avoid some uninitialized variable warnings


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 ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]