gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 9 Oct 2011 20:57:03 +0000 (20:57 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sun, 9 Oct 2011 20:57:03 +0000 (20:57 +0000)
Fix compatibility with older GCCs.
* dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Initialize parameter.
* stack.c (read_frame_arg): Initialize val_deref.

gdb/ChangeLog
gdb/dwarf2loc.c
gdb/stack.c

index bcad13894abf0657d532cb5d59241b9541f83303..eb5ba79a6ec34f6415187700a078c18ecfd617bf 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Fix compatibility with older GCCs.
+       * dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Initialize parameter.
+       * stack.c (read_frame_arg): Initialize val_deref.
+
 2011-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Entry values NEWS entries, DWARF disassembly support.
index 52fda27f2e9b56e1b91eba96e6de5865147afeab..7eb8d8ac7ec09cf0262698afa73b02273a135458 100644 (file)
@@ -833,7 +833,8 @@ dwarf_expr_reg_to_entry_parameter (struct frame_info *frame, int dwarf_reg,
   int iparams;
   struct value *val;
   struct dwarf2_locexpr_baton *dwarf_block;
-  struct call_site_parameter *parameter;
+  /* Initialize it just to avoid a GCC false warning.  */
+  struct call_site_parameter *parameter = NULL;
   CORE_ADDR target_addr;
 
   if (gdbarch != frame_unwind_arch (frame))
index b01dc1c9fa603a2c148681e16337d2451305c2b4..953d3bd4a34848dba4cf4272b7e1c1459d9300c4 100644 (file)
@@ -350,7 +350,8 @@ read_frame_arg (struct symbol *sym, struct frame_info *frame,
              if (!value_optimized_out (val)
                  && value_available_contents_eq (val, 0, entryval, 0, len))
                {
-                 struct value *val_deref, *entryval_deref;
+                 /* Initialize it just to avoid a GCC false warning.  */
+                 struct value *val_deref = NULL, *entryval_deref;
 
                  /* DW_AT_GNU_call_site_value does match with the current
                     value.  If it is a reference still try to verify if