X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/630a021850386acaee461fccee27718577d0a799..957255b82cdbf46a5f74d33862ad7edf7d0fa218:/src/scan-skel.l?ds=sidebyside diff --git a/src/scan-skel.l b/src/scan-skel.l index f13ee813..129b8899 100644 --- a/src/scan-skel.l +++ b/src/scan-skel.l @@ -244,8 +244,9 @@ at_output (int argc, char *argv[], char **out_namep, int *out_linenop) xfclose (yyout); } *out_namep = xstrdup (argv[1]); - output_file_name_check (out_namep); - yyout = xfopen (*out_namep, "w"); + output_file_name_check (out_namep, true); + /* If there were errors, do not generate the output. */ + yyout = xfopen (complaint_status ? "/dev/null" : *out_namep, "w"); *out_linenop = 1; }