This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

[patch] -Wuninitialized fixes


FYI,

	Andrew
2001-03-22  Andrew Cagney  <ac131313@redhat.com>

	* exec.c (xfer_memory): Always initialize section.
	* infrun.c (normal_stop): Always initialize source_flag.

Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.12
diff -p -r1.12 exec.c
*** exec.c	2001/03/06 08:21:07	1.12
--- exec.c	2001/03/22 23:57:29
*************** xfer_memory (CORE_ADDR memaddr, char *my
*** 486,492 ****
    struct section_table *p;
    CORE_ADDR nextsectaddr, memend;
    boolean (*xfer_fn) (bfd *, sec_ptr, PTR, file_ptr, bfd_size_type);
!   asection *section;
  
    if (len <= 0)
      internal_error (__FILE__, __LINE__, "failed internal consistency check");
--- 486,492 ----
    struct section_table *p;
    CORE_ADDR nextsectaddr, memend;
    boolean (*xfer_fn) (bfd *, sec_ptr, PTR, file_ptr, bfd_size_type);
!   asection *section = NULL;
  
    if (len <= 0)
      internal_error (__FILE__, __LINE__, "failed internal consistency check");
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.28
diff -p -r1.28 infrun.c
*** infrun.c	2001/03/20 18:16:10	1.28
--- infrun.c	2001/03/22 23:57:35
*************** and/or watchpoints.\n");
*** 3521,3526 ****
--- 3521,3527 ----
  	      source_flag = SRC_LINE;
  	      break;
  	    case PRINT_NOTHING:
+ 	      source_flag = SRC_LINE; /* something bogus */
  	      do_frame_printing = 0;
  	      break;
  	    default:

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