[RFC 15/18] gdb.base/sizeof.exp C++ify

Pedro Alves pedro@palves.net
Mon Sep 14 00:14:34 GMT 2020


Fixes:
  src/gdb/testsuite/gdb.base/sizeof.c:54:9: error: cannot initialize a variable of type 'char *' with an lvalue of type 'void *'
---
 gdb/testsuite/gdb.base/sizeof.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/sizeof.c b/gdb/testsuite/gdb.base/sizeof.c
index fde52139ef8..4cf8c55898b 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];
-- 
2.14.5



More information about the Gdb-patches mailing list