diff options
author | Pedro Alves <pedro@palves.net> | 2020-09-17 23:33:43 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2020-09-18 00:08:17 +0100 |
commit | ef0cdbc16f4909d667497691f456d15c7dc7cdba (patch) | |
tree | 03633843e80d9c3e80e02c0560109b0f0ac46406 | |
parent | 3a5eeb8b63c3d408b0f9257c61f11c36e49fd265 (diff) | |
download | gdb-ef0cdbc16f4909d667497691f456d15c7dc7cdba.zip gdb-ef0cdbc16f4909d667497691f456d15c7dc7cdba.tar.gz gdb-ef0cdbc16f4909d667497691f456d15c7dc7cdba.tar.bz2 |
gdb.base/sizeof.exp C++ify
Fixes:
src/gdb/testsuite/gdb.base/sizeof.c:54:9: error: cannot initialize a variable of type 'char *' with an lvalue of type 'void *'
... when the testcase is built with a C++ compiler.
gdb/testsuite/ChangeLog:
* gdb.base/sizeof.c (fill): Add cast.
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/sizeof.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4ecee4b..db14158 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2020-09-17 Pedro Alves <pedro@palves.net> + * gdb.base/sizeof.c (fill): Add cast. + +2020-09-17 Pedro Alves <pedro@palves.net> + * gdb.base/share-env-with-gdbserver.c (main): Add cast. 2020-09-17 Pedro Alves <pedro@palves.net> diff --git a/gdb/testsuite/gdb.base/sizeof.c b/gdb/testsuite/gdb.base/sizeof.c index fde5213..4cf8c55 100644 --- a/gdb/testsuite/gdb.base/sizeof.c +++ b/gdb/testsuite/gdb.base/sizeof.c @@ -51,7 +51,7 @@ struct { static void fill (void *buf, long sizeof_buf) { - char *p = buf; + char *p = (char *) buf; int i; for (i = 0; i < sizeof_buf; i++) p[i] = "The quick brown dingo jumped over the layzy dog."[i]; |