gdb/
[binutils-gdb.git] / gdb / addrmap.c
index aa5afeb55b3c4f3b99e35cff1447a061c267a2f7..30ec1ef57b2938d687a02c455ffdcc4eb0361aa3 100644 (file)
@@ -1,6 +1,6 @@
 /* addrmap.c --- implementation of address map data structure.
 
-   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -224,8 +224,8 @@ static splay_tree_key
 allocate_key (struct addrmap_mutable *map, CORE_ADDR addr)
 {
   CORE_ADDR *key = obstack_alloc (map->obstack, sizeof (*key));
-  *key = addr;
 
+  *key = addr;
   return (splay_tree_key) key;
 }
 
@@ -533,6 +533,9 @@ addrmap_create_mutable (struct obstack *obstack)
 \f
 /* Initialization.  */
 
+/* Provide a prototype to silence -Wmissing-prototypes.  */
+extern initialize_file_ftype _initialize_addrmap;
+
 void
 _initialize_addrmap (void)
 {