From: Joel E. Denny Date: Sun, 11 Oct 2009 20:15:39 +0000 (-0400) Subject: portability: use va_start and va_end in the same function. X-Git-Tag: v2.4.1a~18 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/7aaf9ce7582bb4fe33f29c9f2a137f2c774b05f1?ds=sidebyside 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. (cherry picked from commit 786578e394700615f6a841614e1280bf6284ec8c) --- diff --git a/ChangeLog b/ChangeLog index 80734547..6838b038 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-11 Joel E. Denny + + 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 tests: skip tests of file names that platform does not support. diff --git a/src/complain.c b/src/complain.c index 801642b4..c5fd1a96 100644 --- a/src/complain.c +++ b/src/complain.c @@ -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); \ }