From 4e4a8b932b7ae8e239eebb597fbb6cfcb7278a64 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 26 Feb 2019 14:52:05 -0700 Subject: [PATCH] Add ATTRIBUTE_UNUSED_RESULT to macro_buffer This applies ATTRIBUTE_UNUSED_RESULT to macro_buffer::release. gdb/ChangeLog 2019-03-05 Tom Tromey * macroexp.c (struct macro_buffer) : Add ATTRIBUTE_UNUSED_RESULT. --- gdb/ChangeLog | 5 +++++ gdb/macroexp.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a420e2a6e7c..f26c9438ff7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-03-05 Tom Tromey + + * macroexp.c (struct macro_buffer) : Add + ATTRIBUTE_UNUSED_RESULT. + 2019-03-05 Tom Tromey * nat/linux-btrace.c (linux_enable_bts, linux_enable_pt): Update. diff --git a/gdb/macroexp.c b/gdb/macroexp.c index 0e8e85cdf23..a588cc836fe 100644 --- a/gdb/macroexp.c +++ b/gdb/macroexp.c @@ -130,7 +130,7 @@ struct macro_buffer /* Release the text of the buffer to the caller, which is now responsible for freeing it. */ - char *release () + ATTRIBUTE_UNUSED_RESULT char *release () { gdb_assert (! shared); gdb_assert (size); -- 2.30.2