This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix compile time warning about a redundant comparison in an assertion statement.
- From: Nick Clifton <nickc at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 13 Jun 2016 13:22:58 -0000
- Subject: [binutils-gdb] Fix compile time warning about a redundant comparison in an assertion statement.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e46dd0f46b9a2ac2b07343b91c447620ede47d26
commit e46dd0f46b9a2ac2b07343b91c447620ede47d26
Author: Nick Clifton <nickc@redhat.com>
Date: Mon Jun 13 14:22:21 2016 +0100
Fix compile time warning about a redundant comparison in an assertion statement.
* gdbtypes.c (replace_type): Fix assertion.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/gdbtypes.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 335476b..1bd309f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-13 Nick Clifton <nickc@redhat.com>
+
+ * gdbtypes.c (replace_type): Fix assertion.
+
2016-06-10 Tom Tromey <tom@tromey.com>
* gdbtypes.c (arch_type, arch_integer_type, arch_character_type)
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);