diff options
author | rlar <rlar> | 2016-03-01 19:36:08 +0100 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-03-12 14:28:55 -0500 |
commit | 8c098febc9a599397921e9b6938b7fb85e38cc7e (patch) | |
tree | e6643ad839e58b5cff73aeb90179f2a425e0072e /src/flex.skl | |
parent | cf4121fa97abac8aeaa5e08b8fc0b2380228494e (diff) |
generated code, in yy_get_next_buffer(), change type of local `number_to_move'
suits better, because `yy_n_chars' and `yy_buf_size' are of type `int'
Diffstat (limited to 'src/flex.skl')
-rw-r--r-- | src/flex.skl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flex.skl b/src/flex.skl index caceb4b..17da8da 100644 --- a/src/flex.skl +++ b/src/flex.skl @@ -1661,7 +1661,7 @@ int yyFlexLexer::yy_get_next_buffer() M4_YY_DECL_GUTS_VAR(); char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = YY_G(yytext_ptr); - yy_size_t number_to_move, i; + int number_to_move, i; int ret_val; if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] ) @@ -1690,7 +1690,7 @@ int yyFlexLexer::yy_get_next_buffer() /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1; + number_to_move = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1778,7 +1778,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]], else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((int) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |