From 7dbfcd6f79d9f66e317e61bac5855868f8d20043 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Mon, 25 May 2020 11:40:07 -0400 Subject: gdbsupport: Drop now unused function 'stringify_argv' The function did not properly escape special characters and all uses have been replaced in previous commits, so drop the now unused function. gdbsupport/ChangeLog: * common-utils.cc, common-utils.h (stringify_argv): Drop now unused function stringify_argv Change-Id: Id5f861f44eae1f0fbde3476a5eac23a842ed04fc --- gdbsupport/ChangeLog | 5 +++++ gdbsupport/common-utils.cc | 23 ----------------------- gdbsupport/common-utils.h | 4 ---- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog index 61b57ffc456..7c2c4bff475 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -1,3 +1,8 @@ +2020-05-25 Michael Weghorn + + * common-utils.cc, common-utils.h (stringify_argv): Drop + now unused function stringify_argv + 2020-05-25 Michael Weghorn * common-inferior.cc, common-inferior.h (construct_inferior_arguments): diff --git a/gdbsupport/common-utils.cc b/gdbsupport/common-utils.cc index ed05d619c77..b5e4d2928ec 100644 --- a/gdbsupport/common-utils.cc +++ b/gdbsupport/common-utils.cc @@ -375,29 +375,6 @@ free_vector_argv (std::vector &v) /* See gdbsupport/common-utils.h. */ -std::string -stringify_argv (const std::vector &args) -{ - std::string ret; - - if (!args.empty () && args[0] != NULL) - { - for (auto s : args) - if (s != NULL) - { - ret += s; - ret += ' '; - } - - /* Erase the last whitespace. */ - ret.erase (ret.end () - 1); - } - - return ret; -} - -/* See gdbsupport/common-utils.h. */ - ULONGEST align_up (ULONGEST v, int n) { diff --git a/gdbsupport/common-utils.h b/gdbsupport/common-utils.h index ba03427c6f7..30ee412365f 100644 --- a/gdbsupport/common-utils.h +++ b/gdbsupport/common-utils.h @@ -154,10 +154,6 @@ extern const char *skip_to_space (const char *inp); freeing all the elements. */ extern void free_vector_argv (std::vector &v); -/* Given a vector of arguments ARGV, return a string equivalent to - joining all the arguments with a whitespace separating them. */ -extern std::string stringify_argv (const std::vector &argv); - /* Return true if VALUE is in [LOW, HIGH]. */ template -- cgit v1.2.1