diff options
author | Tom de Vries <tdevries@suse.de> | 2020-05-01 11:04:22 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-05-01 11:04:22 +0200 |
commit | 53ae0aa9c65bc41b6f67f52a657b9f5339a331be (patch) | |
tree | 5a76921e945c7d9d4ccb5d10fa23877316e569b4 /gdb/testsuite/ChangeLog | |
parent | a2714d6cca1f1c7695f8dc84b49a4a51d1db86c8 (diff) | |
download | gdb-53ae0aa9c65bc41b6f67f52a657b9f5339a331be.zip gdb-53ae0aa9c65bc41b6f67f52a657b9f5339a331be.tar.gz gdb-53ae0aa9c65bc41b6f67f52a657b9f5339a331be.tar.bz2 |
[gdb/testsuite] Fix Wunused-result warning in until-reverse.c
When running test-case gdb.reverse/until-reverse.exp or
gdb.reverse/until-precsave.exp with gcc-10, we run into a Wunused-result
warning:
...
gdb compile failed, gdb.reverse/until-reverse.c: In function 'main':
gdb.reverse/until-reverse.c:40:14: warning: ignoring return value of \
'malloc' declared with attribute 'warn_unused_result' [-Wunused-result]
40 | (void) malloc (1);
| ^~~~~~~~~~
...
Fix this by using the result of malloc as argument to a free call.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-05-01 Tom de Vries <tdevries@suse.de>
* gdb.reverse/until-reverse.c (main): Fix Wunused-result warning.
Diffstat (limited to 'gdb/testsuite/ChangeLog')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e2bf45b..210499a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-05-01 Tom de Vries <tdevries@suse.de> + + * gdb.reverse/until-reverse.c (main): Fix Wunused-result warning. + 2020-04-30 Hannes Domani <ssbssa@yahoo.de> PR gdb/18706 |