From patchwork Tue Mar 12 17:03:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 31825 Received: (qmail 20481 invoked by alias); 12 Mar 2019 17:03:33 -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 20435 invoked by uid 89); 12 Mar 2019 17:03:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=H*MI:sk:2019031 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Mar 2019 17:03:31 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7737841FBE3 for ; Tue, 12 Mar 2019 17:03:30 +0000 (UTC) Received: from localhost.localdomain (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2FA41001E63 for ; Tue, 12 Mar 2019 17:03:29 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed 1/2] Fix test-cp-name-parser build, unused variable Date: Tue, 12 Mar 2019 17:03:26 +0000 Message-Id: <20190312170327.14109-2-palves@redhat.com> In-Reply-To: <20190312170327.14109-1-palves@redhat.com> References: <20190312170327.14109-1-palves@redhat.com> MIME-Version: 1.0 $ make test-cp-name-parser ... CXX test-cp-name-parser.o src/gdb/cp-name-parser.y: In function ‘int gdb::main(int, char**)’: src/gdb/cp-name-parser.y:2137:6: error: unused variable ‘len’ [-Werror=unused-variable] int len; ^~~ cc1plus: all warnings being treated as errors gdb/ChangeLog: 2019-03-12 Pedro Alves * cp-name-parser.y (main): Remove unused 'len' variable. --- gdb/ChangeLog | 4 ++++ gdb/cp-name-parser.y | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6903f2281..44aa9a3b94 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Pedro Alves + + * cp-name-parser.y (main): Remove unused 'len' variable. + 2019-03-12 Tom Tromey * common/ptid.c (null_ptid, minus_one_ptid): Now const. diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index 284b1ff121..ec1721007f 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -2129,7 +2129,6 @@ main (int argc, char **argv) if (argv[arg] == NULL) while (fgets (buf, 65536, stdin) != NULL) { - int len; buf[strlen (buf) - 1] = 0; /* Use DMGL_VERBOSE to get expanded standard substitutions. */ c = trim_chars (buf, &extra_chars);