From 3a5eeb8b63c3d408b0f9257c61f11c36e49fd265 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 17 Sep 2020 23:33:42 +0100 Subject: [PATCH] gdb.base/share-env-with-gdbserver.exp C++ify gdb/testsuite/ChangeLog: * gdb.base/share-env-with-gdbserver.c (main): Add cast. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/share-env-with-gdbserver.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b123bb60540..4ecee4bcefd 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-09-17 Pedro Alves + + * gdb.base/share-env-with-gdbserver.c (main): Add cast. + 2020-09-17 Pedro Alves * gdb.base/prologue.c [__cplusplus] (marker): Explicitly specify 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"); -- 2.30.2