From 407890254381e1a6962c783fdefd36b490059686 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 18 Nov 2016 19:40:39 -0500 Subject: [PATCH] Compiling: Fix flexfix adding new warning back in flex 2.5.35 --- src/flexfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flexfix b/src/flexfix index 3a563c41e..652f80364 100755 --- a/src/flexfix +++ b/src/flexfix @@ -19,7 +19,7 @@ my $Opt_Prefix = $ARGV[0] or die "%Error: No prefix specified,"; foreach my $line () { # Fix flex 2.6.0 warning - $line =~ s/ > YY_CURRENT_BUFFER_LVALUE->yy_buf_size/ > (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size/; + $line =~ s/\(\(int\) \(\(yy_n_chars\) \+ number_to_move\) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size\)/((int) ((yy_n_chars) + number_to_move) > (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size)/g; $line =~ s/ number_to_move == YY_MORE_ADJ / (int)number_to_move == (int)YY_MORE_ADJ /; # Fix flex 2.5.4 namespace omission $line =~ s/^class istream;/\#include \nusing namespace std;\n/;