Remove mi_version function

Message ID 20230320182702.1531494-1-tromey@adacore.com
State New
Headers
Series Remove mi_version function |

Commit Message

Tom Tromey March 20, 2023, 6:27 p.m. UTC
  The mi_version function is unused, and I think it's better overall if
it is never used.  This patch removes it.  Tested by rebuilding.
---
 gdb/mi/mi-out.c | 6 ------
 gdb/mi/mi-out.h | 1 -
 2 files changed, 7 deletions(-)
  

Comments

Simon Marchi March 20, 2023, 6:38 p.m. UTC | #1
On 3/20/23 14:27, Tom Tromey via Gdb-patches wrote:
> The mi_version function is unused, and I think it's better overall if
> it is never used.  This patch removes it.  Tested by rebuilding.

LGTM:

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon
  

Patch

diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index 5ce24a30999..29a416a426d 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -360,12 +360,6 @@  as_mi_ui_out (ui_out *uiout)
   return gdb::checked_static_cast<mi_ui_out *> (uiout);
 }
 
-int
-mi_version (ui_out *uiout)
-{
-  return as_mi_ui_out (uiout)->version ();
-}
-
 void
 mi_out_put (ui_out *uiout, struct ui_file *stream)
 {
diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h
index b63492f459c..10c9f8a4585 100644
--- a/gdb/mi/mi-out.h
+++ b/gdb/mi/mi-out.h
@@ -145,7 +145,6 @@  class mi_ui_out : public ui_out
    Return nullptr if an invalid version is provided.  */
 mi_ui_out *mi_out_new (const char *mi_version);
 
-int mi_version (ui_out *uiout);
 void mi_out_put (ui_out *uiout, struct ui_file *stream);
 void mi_out_rewind (ui_out *uiout);