Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [pushed 1/2] Fix test-cp-name-parser build, unused variable
Date: Tue, 12 Mar 2019 17:03:00 -0000	[thread overview]
Message-ID: <20190312170327.14109-2-palves@redhat.com> (raw)
In-Reply-To: <20190312170327.14109-1-palves@redhat.com>

  $ 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  <palves@redhat.com>

	* 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  <palves@redhat.com>
+
+	* cp-name-parser.y (main): Remove unused 'len' variable.
+
 2019-03-12  Tom Tromey  <tromey@adacore.com>
 
 	* 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);
-- 
2.14.4


  parent reply	other threads:[~2019-03-12 17:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12 17:03 [pushed 0/2] Fix test-cp-name-parser build Pedro Alves
2019-03-12 17:03 ` [pushed 2/2] Fix test-cp-name-parser build, parser_fprintf undefined Pedro Alves
2019-03-12 17:03 ` Pedro Alves [this message]
2019-03-12 17:10 ` [pushed 0/2] Fix test-cp-name-parser build Tom Tromey
2019-03-12 17:23   ` Pedro Alves
2019-03-12 17:48     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190312170327.14109-2-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox