diagnostic.c (diagnostic_append_note): Also call va_end when inhibit_notes_p is true.
authorTobias Burnus <burnus@net-b.de>
Mon, 12 Nov 2012 11:00:58 +0000 (12:00 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Mon, 12 Nov 2012 11:00:58 +0000 (12:00 +0100)
2012-11-12  Tobias Burnus  <burnus@net-b.de>

        * diagnostic.c (diagnostic_append_note): Also call va_end when
        inhibit_notes_p is true.

From-SVN: r193428

gcc/ChangeLog
gcc/diagnostic.c

index 9a82d73134c24d16e51eb698979488fc8359eaae..d815477a4293825b768dc14f859378bcce27d81f 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 ff210dcaed4587bc09d46e417cfb5a676df3c550..4d9b00766c6437cc0658239037787f086980d94c 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);