Dummy leftover in d3037ba6a398d37585b3d34ff9ed439848ba98a1

Dmitry Antipov <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.