diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fix-bison.pl | 8 | ||||
-rwxr-xr-x | scripts/install-bison3.sh | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scripts/fix-bison.pl b/scripts/fix-bison.pl index 38f45e81..b5b3e748 100755 --- a/scripts/fix-bison.pl +++ b/scripts/fix-bison.pl @@ -12,6 +12,7 @@ # my $seen_yyerrlab1=0; +my $syntax_error_has_default=0; my $line_offset=1; # #line directives always refer to the NEXT line while(<>) { # Remove code that causes a warning @@ -42,8 +43,11 @@ while(<>) { next; } - if(m%^\# undef YYCASE_$%) { - # Add a default value for yyformat for coverity CID 10838 + # syntax error handler will have a default case already in Bison 3.0.5+ + $syntax_error_has_default=1 if /default: \/\* Avoid compiler warnings. \*\//; + + if(m%^\# undef YYCASE_$% and $syntax_error_has_default==0) { + # Add a default value for yyformat on Bison <3.0.5, for coverity CID 10838 my $line=$_; print qq{ default: yyformat = YY_("syntax error");\n}; $line_offset++; # extra line diff --git a/scripts/install-bison3.sh b/scripts/install-bison3.sh index 52fa0ed1..3f2f133a 100755 --- a/scripts/install-bison3.sh +++ b/scripts/install-bison3.sh @@ -5,7 +5,7 @@ set -x PACKAGE=bison MIN_VERSION=3.0.0 -INSTALL_VERSION=3.0.2 +INSTALL_VERSION=3.0.5 # Bison requires that CC is a C compiler CC=cc |