OSDN Git Service

2012-11-12 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Nov 2012 11:00:58 +0000 (11:00 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Nov 2012 11:00:58 +0000 (11:00 +0000)
        * diagnostic.c (diagnostic_append_note): Also call va_end when
        inhibit_notes_p is true.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193428 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/diagnostic.c

index 9a82d73..d815477 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-12  Tobias Burnus  <burnus@net-b.de>
+
+       * diagnostic.c (diagnostic_append_note): Also call va_end when
+       inhibit_notes_p is true.
+
 2012-11-12  Bin Cheng  <bin.cheng@arm.com>
 
        * gcse.c (struct bb_data): Add new fields, old_pressure, live_in
index ff210dc..4d9b007 100644 (file)
@@ -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);