From patchwork Sat Nov 3 18:46:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 30016 Received: (qmail 573 invoked by alias); 3 Nov 2018 18:46:23 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 554 invoked by uid 89); 3 Nov 2018 18:46:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mailsec110.isp.belgacom.be Received: from mailsec110.isp.belgacom.be (HELO mailsec110.isp.belgacom.be) (195.238.20.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 03 Nov 2018 18:46:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1541270782; x=1572806782; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=92WYQn88qxvHlp7Gtp+OQw/dhCKQyu7/yPGoN4wo2Nk=; b=CB1F5klqv3b7/69lpjGLgq1hUtS0fRyR2tyg9ZZErMpah9XuCOhlFRTo AX43ecIE33OP/CD0ZZcnCzE4I5mPjA==; Received: from 110.212-243-81.adsl-dyn.isp.belgacom.be (HELO md.home) ([81.243.212.110]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 03 Nov 2018 19:46:20 +0100 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [PUSHED] OBVIOUS Remove a useless const char *type and its initialization. Date: Sat, 3 Nov 2018 19:46:13 +0100 Message-Id: <20181103184613.11707-1-philippe.waroquiers@skynet.be> MIME-Version: 1.0 X-IsSubscribed: yes Valgrind detected a leak for the line: type = xstrdup ("auto"); as the compile probably dropped the type variable completely, as its only usage was this initialization. So, remove the useless variable. --- gdb/ChangeLog | 5 +++++ gdb/language.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 95591f6485..87db7f5fb2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-11-03 Philippe Waroquiers + + * language.c (type): Remove. + (_initialize_language): Remove assignment to type. + 2018-11-02 Joel Brobecker * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files. diff --git a/gdb/language.c b/gdb/language.c index 21eda576b0..e2f400161b 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -105,10 +105,9 @@ static const struct language_defn *languages[] = { &ada_language_defn, }; -/* The current values of the "set language/type/range" enum +/* The current values of the "set language/range/case-sensitive" enum commands. */ static const char *language; -static const char *type; static const char *range; static const char *case_sensitive; @@ -1174,7 +1173,6 @@ For Fortran the default is off; for other languages the default is on."), add_set_language_command (); language = xstrdup ("auto"); - type = xstrdup ("auto"); range = xstrdup ("auto"); case_sensitive = xstrdup ("auto");