From: Dmitry Antipov <dantipov@nvidia.com>
To: GDB Development <gdb@sourceware.org>
Cc: Yao Qi <yao.qi@linaro.org>
Subject: Dummy leftover in d3037ba6a398d37585b3d34ff9ed439848ba98a1
Date: Tue, 17 Oct 2017 12:01:00 -0000 [thread overview]
Message-ID: <6cfccaca-31c2-d994-f8c1-fda3f72224e3@nvidia.com> (raw)
g++ -x c++ -O0 -g3 -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/home/dantipov/.local/gdb-8.0.50/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode
-I../../gdb/../opcodes/.. -I../../gdb/../readline/.. -I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/gnulib/import
-Ibuild-gnulib/import -DTUI=1 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable
-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Werror -c -o regcache.o -MT regcache.o -MMD -MP -MF ./.deps/regcache.Tpo ../../gdb/regcache.c
In file included from ../../gdb/common/common-defs.h:79:0,
from ../../gdb/defs.h:28,
from ../../gdb/regcache.c:20:
../../gdb/regcache.c: In member function ‘register_status regcache::xfer_part(int, int, int, void*, const void*, bool)’:
../../gdb/regcache.c:935:24: error: the address of ‘ssize_t read(int, void*, size_t)’ will never be NULL [-Werror=address]
gdb_assert (read != NULL);
^
../../gdb/common/gdb_assert.h:34:13: note: in definition of macro ‘gdb_assert’
((void) ((expr) ? 0 : \
^~~~
cc1plus: all warnings being treated as errors
IIUC this gdb_assert () is no longer needed:
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 555db578b6..603d2f211c 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
Dmitry
next reply other threads:[~2017-10-17 12:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 12:01 Dmitry Antipov [this message]
2017-10-18 15:35 ` 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=6cfccaca-31c2-d994-f8c1-fda3f72224e3@nvidia.com \
--to=dantipov@nvidia.com \
--cc=gdb@sourceware.org \
--cc=yao.qi@linaro.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