diff options
author | Pedro Alves <pedro@palves.net> | 2020-09-17 23:33:41 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2020-09-18 00:06:39 +0100 |
commit | 81f904895e839b19091832bb83f353d2f4963939 (patch) | |
tree | bb74cafb7f8714307a991919ac6ccb20f2b94a8a | |
parent | 0a229804ab1d9d442295010633ba565bdb1c9e2d (diff) | |
download | gdb-81f904895e839b19091832bb83f353d2f4963939.zip gdb-81f904895e839b19091832bb83f353d2f4963939.tar.gz gdb-81f904895e839b19091832bb83f353d2f4963939.tar.bz2 |
gdb.mi/var-cmd.c C++ify
This adjusts gdb.mi/var-cmd.c to make it buildable as a C++ program.
gdb/testsuite/ChangeLog:
* gdb.mi/var-cmd.c (do_anonymous_type_tests): Add cast.
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/var-cmd.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a97ac09..75a4c2d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2020-09-17 Pedro Alves <pedro@palves.net> + * gdb.mi/var-cmd.c (do_anonymous_type_tests): Add cast. + +2020-09-17 Pedro Alves <pedro@palves.net> + * gdb.base/exprs.c: Replace 'this' with 'self' throughout. * gdb.base/ptype.c: : Replace 'this' with 'self' throughout. (charfoo, intfoo): Define full prototype. diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c index 0529b67..f209106 100644 --- a/gdb/testsuite/gdb.mi/var-cmd.c +++ b/gdb/testsuite/gdb.mi/var-cmd.c @@ -566,7 +566,7 @@ do_anonymous_type_tests (void) }; } v = {1, {2}, {3}}; - anon = malloc (sizeof (struct anonymous)); + anon = (struct anonymous *) malloc (sizeof (struct anonymous)); anon->a = 1; anon->b = 2; anon->c = (char *) 3; |