public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [FYI] Remove obsolete assertion from regcache.c
Date: Tue, 17 Oct 2017 12:43:00 -0000	[thread overview]
Message-ID: <20171017124149.19024-1-tom@tromey.com> (raw)

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  <tom@tromey.com>

	* 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  <tom@tromey.com>
+
+	* regcache.c (enum register_status): Remove assertion.
+
 2017-10-17  Pedro Alves  <palves@redhat.com>
 
 	* 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
-- 
2.9.5

             reply	other threads:[~2017-10-17 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 12:43 Tom Tromey [this message]
2017-10-17 12:43 ` Tom Tromey

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=20171017124149.19024-1-tom@tromey.com \
    --to=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).