From ef0cdbc16f4909d667497691f456d15c7dc7cdba Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 17 Sep 2020 23:33:43 +0100 Subject: 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. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/sizeof.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gdb') 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 + * gdb.base/sizeof.c (fill): Add cast. + +2020-09-17 Pedro Alves + * gdb.base/share-env-with-gdbserver.c (main): Add cast. 2020-09-17 Pedro Alves 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]; -- cgit v1.1