Most va_end implementations are no-ops, so it probably didn't affect many people, but POSIX requires all va_start to be matched with va_end for the rare platform where va_end is not a no-op. Detected by Coverity.
* src/m4.c (m4_error, m4_error_at_line): Add missing va_end. Signed-off-by: Eric Blake <[email protected]> --- ChangeLog | 5 +++++ src/m4.c | 2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 894ca8b..862b516 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-04-29 Eric Blake <[email protected]> + + m4_error: fix missing va_end + * src/m4.c (m4_error, m4_error_at_line): Add missing va_end. + 2011-03-01 Eric Blake <[email protected]> Release Version 1.4.16. diff --git a/src/m4.c b/src/m4.c index d7ad7cd..6f1645a 100644 --- a/src/m4.c +++ b/src/m4.c @@ -99,6 +99,7 @@ m4_error (int status, int errnum, const char *format, ...) current_line, format, args); if (fatal_warnings && ! retcode) retcode = EXIT_FAILURE; + va_end (args); } /*-------------------------------. @@ -114,6 +115,7 @@ m4_error_at_line (int status, int errnum, const char *file, int line, verror_at_line (status, errnum, line ? file : NULL, line, format, args); if (fatal_warnings && ! retcode) retcode = EXIT_FAILURE; + va_end (args); } #ifndef SIGBUS -- 1.7.4.4 _______________________________________________ M4-patches mailing list [email protected] https://lists.gnu.org/mailman/listinfo/m4-patches
