]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdbsupport: Drop now unused function 'stringify_argv'
authorMichael Weghorn <m.weghorn@posteo.de>
Mon, 25 May 2020 15:40:07 +0000 (11:40 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 25 May 2020 15:40:35 +0000 (11:40 -0400)
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
gdbsupport/common-utils.cc
gdbsupport/common-utils.h

index 61b57ffc456bf959bb1c75b4a3fc5342db766751..7c2c4bff4750d1428d28793cad0a708573d61a3d 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-25  Michael Weghorn  <m.weghorn@posteo.de>
+
+       * common-utils.cc, common-utils.h (stringify_argv): Drop
+       now unused function stringify_argv
+
 2020-05-25  Michael Weghorn  <m.weghorn@posteo.de>
 
        * common-inferior.cc, common-inferior.h (construct_inferior_arguments):
index ed05d619c778992c36d61c962bca28e5f81c7b72..b5e4d2928ecd1ed1e59286c5bf9f82aae0f30d3c 100644 (file)
@@ -375,29 +375,6 @@ free_vector_argv (std::vector<char *> &v)
 
 /* See gdbsupport/common-utils.h.  */
 
-std::string
-stringify_argv (const std::vector<char *> &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)
 {
index ba03427c6f790095345b25807ec4c7017a782e11..30ee412365f585097504f83bf9fabb2dce12dda2 100644 (file)
@@ -154,10 +154,6 @@ extern const char *skip_to_space (const char *inp);
    freeing all the elements.  */
 extern void free_vector_argv (std::vector<char *> &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<char *> &argv);
-
 /* Return true if VALUE is in [LOW, HIGH].  */
 
 template <typename T>