From d4bcee5cccce0ef4acb6f7cb571f439bba07df7f Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 17 Sep 2020 23:33:42 +0100 Subject: gdb.python/{py-framefilter-mi,py-framefilter}.c C++ify This adjusts: gdb.python/{py-framefilter-mi,py-framefilter}.c to make them buildable as C++ programs. gdb/testsuite/ChangeLog: * gdb.python/py-framefilter-mi.c (funca): Add casts. * gdb.python/py-framefilter.c.c (funca, func2): Add casts. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.python/py-framefilter-mi.c | 4 ++-- gdb/testsuite/gdb.python/py-framefilter.c | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 75a4c2d..a5a35af 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-09-17 Pedro Alves + * gdb.python/py-framefilter-mi.c (funca): Add casts. + * gdb.python/py-framefilter.c.c (funca, func2): Add casts. + +2020-09-17 Pedro Alves + * gdb.mi/var-cmd.c (do_anonymous_type_tests): Add cast. 2020-09-17 Pedro Alves diff --git a/gdb/testsuite/gdb.python/py-framefilter-mi.c b/gdb/testsuite/gdb.python/py-framefilter-mi.c index 1077906..bc2ad1e 100644 --- a/gdb/testsuite/gdb.python/py-framefilter-mi.c +++ b/gdb/testsuite/gdb.python/py-framefilter-mi.c @@ -83,8 +83,8 @@ void funca(void) fb.f = 42; fb.s = 19; - bf = malloc (sizeof (foobar)); - bf->nothing = malloc (128); + bf = (foobar *) malloc (sizeof (foobar)); + bf->nothing = (char *) malloc (128); bf->nothing = "Bar Foo"; bf->f = 24; bf->s = 91; diff --git a/gdb/testsuite/gdb.python/py-framefilter.c b/gdb/testsuite/gdb.python/py-framefilter.c index d98005f..675a0c5 100644 --- a/gdb/testsuite/gdb.python/py-framefilter.c +++ b/gdb/testsuite/gdb.python/py-framefilter.c @@ -84,8 +84,8 @@ void funca(void) fb.f = 42; fb.s = 19; - bf = alloca (sizeof (foobar)); - bf->nothing = alloca (128); + bf = (foobar *) alloca (sizeof (foobar)); + bf->nothing = (char *) alloca (128); bf->nothing = "Bar Foo"; bf->f = 24; bf->s = 91; @@ -112,8 +112,8 @@ int func2(int f) fb.f = 84; fb.s = 38; - bf = alloca (sizeof (foobar)); - bf->nothing = alloca (128); + bf = (foobar *) alloca (sizeof (foobar)); + bf->nothing = (char *) alloca (128); bf->nothing = "Elided Bar Foo"; bf->f = 48; bf->s = 182; -- cgit v1.1