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.
This commit is contained in:
Pedro Alves
2020-09-17 23:33:41 +01:00
parent 0a229804ab
commit 81f904895e
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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.

View File

@ -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;