From patchwork Mon Jun 13 09:41:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 13010 Received: (qmail 85530 invoked by alias); 13 Jun 2016 09:41:23 -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 85509 invoked by uid 89); 13 Jun 2016 09:41:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=nickcredhatcom, sk:nickcr, nickc@redhat.com, U*nickc 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 13 Jun 2016 09:41:14 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E02E780F6A for ; Mon, 13 Jun 2016 09:41:12 +0000 (UTC) Received: from localhost.localdomain.redhat.com (vpn1-6-128.ams2.redhat.com [10.36.6.128]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5D9f4Cj002898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 13 Jun 2016 05:41:12 -0400 From: Nick Clifton To: gdb-patches@sourceware.org Subject: RFA: Fix assertion on replace_types() Date: Mon, 13 Jun 2016 10:41:03 +0100 Message-ID: <87eg812zps.fsf@redhat.com> MIME-Version: 1.0 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 * 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);