-Wuninitialized fixes.
authorAndrew Cagney <cagney@redhat.com>
Thu, 22 Mar 2001 23:58:37 +0000 (23:58 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 22 Mar 2001 23:58:37 +0000 (23:58 +0000)
gdb/ChangeLog
gdb/exec.c
gdb/infrun.c

index 322ac96bc82375aee7f691a24cac4b62a5e309a4..84d19b072e9a7b053659acd794dc35f182e8483d 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-22  Andrew Cagney  <ac131313@redhat.com>
+
+       * exec.c (xfer_memory): Always initialize section.
+       * infrun.c (normal_stop): Always initialize source_flag.
+
 2001-03-22  Andrew Cagney  <ac131313@redhat.com>
 
        * TODO (Remote Protocol Support): Review.  Add notes about ``!'',
index c2b97e4c97bb1b58671950a7ad84a74c3243b96e..511977f57031deedf2fa448fd760ce68cf05a005 100644 (file)
@@ -486,7 +486,7 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
   struct section_table *p;
   CORE_ADDR nextsectaddr, memend;
   boolean (*xfer_fn) (bfd *, sec_ptr, PTR, file_ptr, bfd_size_type);
-  asection *section;
+  asection *section = NULL;
 
   if (len <= 0)
     internal_error (__FILE__, __LINE__, "failed internal consistency check");
index d2373ad8428dab04551ff812370af630d015d78e..7c9a38c5ec59d5f0b3d2e3260360093a67a7d11e 100644 (file)
@@ -3521,6 +3521,7 @@ and/or watchpoints.\n");
              source_flag = SRC_LINE;
              break;
            case PRINT_NOTHING:
+             source_flag = SRC_LINE; /* something bogus */
              do_frame_printing = 0;
              break;
            default: