From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by sourceware.org (Postfix) with ESMTPS id E02C7395A049 for ; Wed, 20 May 2020 16:21:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E02C7395A049 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id C737E2400FC for ; Wed, 20 May 2020 18:21:41 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49RygT2z7Fz6tmZ; Wed, 20 May 2020 18:21:41 +0200 (CEST) From: Michael Weghorn To: gdb-patches@sourceware.org Cc: Michael Weghorn Subject: [PATCH v5 7/9] gdbsupport: Drop now unused function 'stringify_argv' Date: Wed, 20 May 2020 18:21:13 +0200 Message-Id: <20200520162115.713005-7-m.weghorn@posteo.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200520162115.713005-1-m.weghorn@posteo.de> References: <20200429111638.1327262-1-m.weghorn@posteo.de> <20200520162115.713005-1-m.weghorn@posteo.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2020 16:21:44 -0000 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: 2020-05-13 Michael Weghorn * common-utils.cc, common-utils.h (stringify_argv): Drop now unused function stringify_argv --- gdbsupport/common-utils.cc | 23 ----------------------- gdbsupport/common-utils.h | 4 ---- 2 files changed, 27 deletions(-) diff --git a/gdbsupport/common-utils.cc b/gdbsupport/common-utils.cc index ed05d619c7..b5e4d2928e 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 ba03427c6f..30ee412365 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 -- 2.26.2