gdb/testsuite/
[binutils-gdb.git] / gdb / addrmap.c
index b2c0bcec902968bdb9dfede180fb376dda02812c..0dce2bb77517a3c7db07844498355c83c1f999a8 100644 (file)
@@ -1,6 +1,6 @@
 /* addrmap.c --- implementation of address map data structure.
 
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -252,6 +252,13 @@ addrmap_splay_tree_successor (struct addrmap_mutable *map, CORE_ADDR addr)
 }
 
 
+static void
+addrmap_splay_tree_remove (struct addrmap_mutable *map, CORE_ADDR addr)
+{
+  splay_tree_remove (map->tree, (splay_tree_key) &addr);
+}
+
+
 static CORE_ADDR
 addrmap_node_key (splay_tree_node node)
 {
@@ -347,7 +354,7 @@ addrmap_mutable_set_empty (struct addrmap *this,
     {
       next = addrmap_splay_tree_successor (map, addrmap_node_key (n));
       if (addrmap_node_value (n) == prior_value)
-        splay_tree_remove (map->tree, addrmap_node_key (n));
+        addrmap_splay_tree_remove (map, addrmap_node_key (n));
       else
         prior_value = addrmap_node_value (n);
     }
@@ -526,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)
 {