Fix sometimes-uninitialized warning in gdbscm_value_address
[deliverable/binutils-gdb.git] / gdb / coffread.c
index 728e4b698dfae36a68eb74057e6859f7e2900e06..4b5edf0919ed605f5ec3d823ed18bb66a83c4030 100644 (file)
@@ -43,8 +43,6 @@
 #include "psymtab.h"
 #include "build-id.h"
 
-extern void _initialize_coffread (void);
-
 /* Key for COFF-associated data.  */
 
 static const struct objfile_data *coff_objfile_data_key;
@@ -742,10 +740,10 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
 
       if (debugfile)
        {
-         bfd *abfd = symfile_bfd_open (debugfile);
+         gdb_bfd_ref_ptr abfd (symfile_bfd_open (debugfile));
 
-         make_cleanup_bfd_unref (abfd);
-         symbol_file_add_separate (abfd, debugfile, symfile_flags, objfile);
+         symbol_file_add_separate (abfd.get (), debugfile, symfile_flags,
+                                   objfile);
        }
     }
 
This page took 0.023394 seconds and 4 git commands to generate.