aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-11-12 11:00:58 +0000
committerTobias Burnus <burnus@net-b.de>2012-11-12 11:00:58 +0000
commitc5de7d79130c2d4d8588f995d7e843c24471c97e (patch)
treec28159e69dee0727a02304cb3889277dc61bfe5c /gcc/diagnostic.c
parent091d9a6cff7504d1e13c39b5d4a84070e5f642f8 (diff)
2012-11-12 Tobias Burnus <burnus@net-b.de>
* diagnostic.c (diagnostic_append_note): Also call va_end when inhibit_notes_p is true. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193428 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index ff210dcaed4..4d9b00766c6 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -833,7 +833,10 @@ diagnostic_append_note (diagnostic_context *context,
va_start (ap, gmsgid);
diagnostic_set_info (&diagnostic, gmsgid, &ap, location, DK_NOTE);
if (context->inhibit_notes_p)
- return;
+ {
+ va_end (ap);
+ return;
+ }
pp_set_prefix (context->printer,
diagnostic_build_prefix (context, &diagnostic));
pp_newline (context->printer);