From 3b4adfb357d82d4a83852a02febc008249579c8e Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Mon, 12 Nov 2012 12:00:58 +0100 Subject: [PATCH] diagnostic.c (diagnostic_append_note): Also call va_end when inhibit_notes_p is true. 2012-11-12 Tobias Burnus * diagnostic.c (diagnostic_append_note): Also call va_end when inhibit_notes_p is true. From-SVN: r193428 --- gcc/ChangeLog | 5 +++++ gcc/diagnostic.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a82d73134c..d815477a429 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-11-12 Tobias Burnus + + * diagnostic.c (diagnostic_append_note): Also call va_end when + inhibit_notes_p is true. + 2012-11-12 Bin Cheng * gcse.c (struct bb_data): Add new fields, old_pressure, live_in 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);