Remove "do_nothing"
authorTom Tromey <tom@tromey.com>
Sun, 8 Oct 2017 22:19:48 +0000 (16:19 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 9 Oct 2017 23:39:29 +0000 (17:39 -0600)
The do_nothing function in mi-main.c is used as a splay tree
key-deleting function; but NULL serves the same purpose and is used
elsewhere in gdb.  This patch removes the unneeded function.

ChangeLog
2017-10-09  Tom Tromey  <tom@tromey.com>

* mi/mi-main.c (do_nothing): Remove.
(list_available_thread_groups): Update.

gdb/ChangeLog
gdb/mi/mi-main.c

index f1fd73ce201491f8d8c96854287e985318afdcc4..ce21e258730fe3d98f82598bd181522dca82a063 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-09  Tom Tromey  <tom@tromey.com>
+
+       * mi/mi-main.c (do_nothing): Remove.
+       (list_available_thread_groups): Update.
+
 2017-10-09  Pedro Alves  <palves@redhat.com>
 
        * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
index 289445f83249e7b96af0124c5507edc4f944918a..98fff4f1b53e1ddf9d023e3ca18a21fe4f007660 100644 (file)
@@ -701,11 +701,6 @@ output_cores (struct ui_out *uiout, const char *field_name, const char *xcores)
     uiout->field_string (NULL, p);
 }
 
-static void
-do_nothing (splay_tree_key k)
-{
-}
-
 static void
 free_vector_of_osdata_items (splay_tree_value xvalue)
 {
@@ -756,7 +751,7 @@ list_available_thread_groups (const std::set<int> &ids, int recurse)
 
       make_cleanup_osdata_free (threads);
       tree = splay_tree_new (splay_tree_int_comparator,
-                            do_nothing,
+                            NULL,
                             free_vector_of_osdata_items);
       make_cleanup (free_splay_tree, tree);