Add a couple missing va_end() calls

This commit is contained in:
Cary R 2014-09-05 15:39:26 -07:00
parent 96d793ed6b
commit 1572dcd3fd
2 changed files with 3 additions and 1 deletions

View File

@ -53,6 +53,7 @@ void VLerror(const YYLTYPE&loc, const char*msg, ...)
fprintf(stderr, "%s:%d: ", loc.text, loc.first_line);
vfprintf(stderr, msg, ap);
va_end(ap);
fprintf(stderr, "\n");
error_count += 1;

View File

@ -1,7 +1,7 @@
%{
/*
* Copyright (C) 2011 Cary R. (cygcary@yahoo.com)
* Copyright (C) 2011-2014 Cary R. (cygcary@yahoo.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -231,6 +231,7 @@ void yyerror(const char *fmt, ...)
fprintf(stderr, "%s:%u: TABLE ERROR: ", in_file_name,
yylloc.first_line-1);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
errors += 1;
}