This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RFA: Fix assertion on replace_types()
- From: Nick Clifton <nickc at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 13 Jun 2016 10:41:03 +0100
- Subject: RFA: Fix assertion on replace_types()
- Authentication-results: sourceware.org; auth=none
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);