]> git.saurik.com Git - bison.git/commitdiff
portability: use va_start and va_end in the same function.
authorJoel E. Denny <jdenny@clemson.edu>
Sun, 11 Oct 2009 20:15:39 +0000 (16:15 -0400)
committerJoel E. Denny <jdenny@clemson.edu>
Sun, 11 Oct 2009 20:34:44 +0000 (16:34 -0400)
* src/complain.c (error_message): Move va_end from here...
(ERROR_MESSAGE): ... to here.
(cherry picked from commit 786578e394700615f6a841614e1280bf6284ec8c)

ChangeLog
src/complain.c

index 807345478752f77dae810f17504a66a15c9876d8..6838b03807d96124f40d71a3937554db8e7db044 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-11  Joel E. Denny  <jdenny@clemson.edu>
+
+       portability: use va_start and va_end in the same function.
+       * src/complain.c (error_message): Move va_end from here...
+       (ERROR_MESSAGE): ... to here.
+
 2009-10-04  Joel E. Denny  <jdenny@clemson.edu>
 
        tests: skip tests of file names that platform does not support.
index 801642b4ea4c1ebe8b78e48130caca2d86e616d0..c5fd1a96c71d3ba5b05b88ee993ad2d4886f88c4 100644 (file)
@@ -56,7 +56,6 @@ error_message (location *loc,
     fprintf (stderr, "%s: ", prefix);
 
   vfprintf (stderr, message, args);
-  va_end (args);
   putc ('\n', stderr);
   fflush (stderr);
 }
@@ -67,6 +66,7 @@ error_message (location *loc,
   va_list args;                                        \
   va_start (args, Message);                    \
   error_message (Loc, Prefix, Message, args);  \
+  va_end (args);                               \
 }