From patchwork Tue Oct 17 12:41:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 23638 Received: (qmail 52586 invoked by alias); 17 Oct 2017 12:43:02 -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 52566 invoked by uid 89); 17 Oct 2017 12:43:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gproxy2-pub.mail.unifiedlayer.com Received: from gproxy2-pub.mail.unifiedlayer.com (HELO gproxy2-pub.mail.unifiedlayer.com) (69.89.18.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Oct 2017 12:43:01 +0000 Received: from cmgw4 (unknown [10.0.90.85]) by gproxy2.mail.unifiedlayer.com (Postfix) with ESMTP id AEFAC1E14A1 for ; Tue, 17 Oct 2017 06:41:58 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw4 with id Nchv1w00L2f2jeq01chyF6; Tue, 17 Oct 2017 06:41:58 -0600 X-Authority-Analysis: v=2.2 cv=JNNLi4Cb c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=IkcTkHD0fZMA:10 a=02M-m0pO-4AA:10 a=zstS-IiYAAAA:8 a=20KFwNOVAAAA:8 a=NsYlBMtB32xlCTvtLr4A:9 a=fXorsX_jUKwdxrmS:21 a=F5zCD8UfmBIqL_9Y:21 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 Received: from 184-96-33-178.hlrn.qwest.net ([184.96.33.178]:55746 helo=pokyo.Home) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1e4RBz-001eN9-8P; Tue, 17 Oct 2017 06:41:55 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Remove obsolete assertion from regcache.c Date: Tue, 17 Oct 2017 06:41:49 -0600 Message-Id: <20171017124149.19024-1-tom@tromey.com> MIME-Version: 1.0 X-BWhitelist: no X-Exim-ID: 1e4RBz-001eN9-8P X-Source-Sender: 184-96-33-178.hlrn.qwest.net (pokyo.Home) [184.96.33.178]:55746 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes When building I got: ../../binutils-gdb/gdb/regcache.c:935:24: error: the address of ‘ssize_t read(int, void*, size_t)’ will never be NULL [-Werror=address] This happens because "read" used to be a parameter to this function, which was then removed; but the assertion wasn't updated. I don't think the assertion is relevant any more, to this removes it. I'm checking it in as obvious. 2017-10-17 Tom Tromey * regcache.c (enum register_status): Remove assertion. --- gdb/ChangeLog | 4 ++++ gdb/regcache.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 65952c4..8931f36 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-10-17 Tom Tromey + + * regcache.c (enum register_status): Remove assertion. + 2017-10-17 Pedro Alves * xml-support.c (xml_fetch_content_from_file): Call diff --git a/gdb/regcache.c b/gdb/regcache.c index 555db57..603d2f2 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -932,7 +932,6 @@ regcache::xfer_part (int regnum, int offset, int len, void *in, { enum register_status status; - gdb_assert (read != NULL); if (is_raw) status = raw_read (regnum, reg); else