Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: gdb-patches@sourceware.org
Subject: RFA: Fix assertion on replace_types()
Date: Mon, 13 Jun 2016 09:41:00 -0000	[thread overview]
Message-ID: <87eg812zps.fsf@redhat.com> (raw)

Hi Guys,

  Compiling GDB with gcc version 6.1.1 from the about to be released
  Fedora 24 produces a warning/error about a redundant comparison in
  gdbtypes.c:replace_types().  The fix appears obvious to me, but since
  I am not a regular contributor, I thought that I had better check here
  first.

  OK to apply ?
  
Cheers
  Nick

gdb/ChangeLog
2016-06-13  Nick Clifton  <nickc@redhat.com>

	* gdbtypes.c (replace_type): Fix assertion.

diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 48f2cd3..0421cc5 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -756,7 +756,7 @@ replace_type (struct type *ntype, struct type *type)
      the assignment of one type's main type structure to the other
      will produce a type with references to objects (names; field
      lists; etc.) allocated on an objfile other than its own.  */
-  gdb_assert (TYPE_OBJFILE (ntype) == TYPE_OBJFILE (ntype));
+  gdb_assert (TYPE_OBJFILE (ntype) == TYPE_OBJFILE (type));
 
   *TYPE_MAIN_TYPE (ntype) = *TYPE_MAIN_TYPE (type);
 


             reply	other threads:[~2016-06-13  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13  9:41 Nick Clifton [this message]
2016-06-13 10:21 ` Yao Qi

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=87eg812zps.fsf@redhat.com \
    --to=nickc@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