diff options
author | Manoj Srivastava <srivasta@debian.org> | 2016-02-24 17:42:39 -0800 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2016-02-24 17:44:01 -0800 |
commit | e68e1da425634fda40095a7b3196d4175f782987 (patch) | |
tree | 7a826be3f2868150dc169d2736c5dc6e04f0fa55 /src/scan.c | |
parent | 68edd32d194909d5abe648ef7c8c82002b6ce5fb (diff) |
[master]: Cleanup generated files based on changes to flex.skl.debian/2.6.0-11
The variable yy_n_chars had been of type yy_size_t which is incorrect
given its use in read(). While it might be adviseable to look at
defining a yy_ssize_t, there might be some issues doing this and so, for
now, at least, we'll punt back to int.
Bug fix: "Type of yy_n_chars changed to yy_size_t by authors cause bug
in YY_INPUT macro where result argument is tested if < 0; thanks to
gcc's -Werror=type-limits", thanks to Michal Fita
(Closes: #770161).
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
Diffstat (limited to 'src/scan.c')
-rw-r--r-- | src/scan.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -210,7 +210,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - yy_size_t yy_n_chars; + int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -280,7 +280,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +static int yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t yyleng; /* Points to current character in buffer. */ @@ -4250,9 +4250,9 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |