[RFC,14/18] gdb.base/share-env-with-gdbserver.exp C++ify

Message ID 20200914001437.31157-15-pedro@palves.net
State New
Headers show
Series
  • Allow building (more) C tests with a C++ compiler
Related show

Commit Message

Pedro Alves Sept. 14, 2020, 12:14 a.m.
---
 gdb/testsuite/gdb.base/share-env-with-gdbserver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.14.5

Patch

diff --git a/gdb/testsuite/gdb.base/share-env-with-gdbserver.c b/gdb/testsuite/gdb.base/share-env-with-gdbserver.c
index 17e95756a0a..a153f774fca 100644
--- a/gdb/testsuite/gdb.base/share-env-with-gdbserver.c
+++ b/gdb/testsuite/gdb.base/share-env-with-gdbserver.c
@@ -30,7 +30,7 @@  int
 main (int argc, char *argv[])
 {
   /* Call malloc to ensure it is linked in.  */
-  char *tmp = malloc (1);
+  char *tmp = (char *) malloc (1);
   /* Similarly call my_getenv instead of getenv directly to make sure
      the former isn't optimized out.  my_getenv is called by GDB.  */
   const char *myvar = my_getenv ("GDB_TEST_VAR");