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 | |
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>
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | src/scan.c | 8 | ||||
-rw-r--r-- | src/skel.c | 10 |
3 files changed, 14 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index 339e244..a910e72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,12 @@ flex (2.6.0-11) unstable; urgency=low * Cherry pick fix from upstream. * Bug fix: "n_alloc has wrong value in buf_append function", thanks to Howard Gong (Closes: #761250). + * 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). - -- Manoj Srivastava <srivasta@debian.org> Wed, 24 Feb 2016 17:15:08 -0800 + -- Manoj Srivastava <srivasta@debian.org> Wed, 24 Feb 2016 17:43:41 -0800 flex (2.6.0-10) unstable; urgency=low @@ -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()" ); @@ -638,7 +638,7 @@ const char *skel[] = { " /* 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", @@ -727,7 +727,7 @@ const char *skel[] = { "%not-for-header", "/* 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. */", @@ -898,7 +898,7 @@ const char *skel[] = { " size_t yy_buffer_stack_max; /**< capacity of stack. */", " YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */", " char yy_hold_char;", - " yy_size_t yy_n_chars;", + " int yy_n_chars;", " yy_size_t yyleng_r;", " char *yy_c_buf_p;", " int yy_init;", @@ -2004,9 +2004,9 @@ const char *skel[] = { " else", " ret_val = EOB_ACT_CONTINUE_SCAN;", "", - " if ((yy_size_t) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {", + " if ((int) (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. */", - " yy_size_t new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1);", + " 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(", " (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size M4_YY_CALL_LAST_ARG );", " if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )", |