From d3d5d6b0752daaed00287cc05eb3120a2a06c0de Mon Sep 17 00:00:00 2001 From: "marko@hundin.mysql.fi" <> Date: Fri, 17 Jun 2005 12:00:05 +0300 Subject: [PATCH] pars0lex.l: Add one more step to the patching instructions. lexyy.c: Fix a Win64 type conversion warning --- innobase/pars/lexyy.c | 5 ++++- innobase/pars/pars0lex.l | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/innobase/pars/lexyy.c b/innobase/pars/lexyy.c index 0112f618533..1145ca295e7 100644 --- a/innobase/pars/lexyy.c +++ b/innobase/pars/lexyy.c @@ -616,6 +616,9 @@ How to make the InnoDB parser and lexer C files: 7. Add '#include "univ.i"' before #include in lexyy.c (Needed for AIX) +8. Add a type cast to int to the assignment below the comment + 'need more input.' (Removes a warning on Win64) + These instructions seem to work at least with bison-1.28 and flex-2.5.4 on Linux. *******************************************************/ @@ -2114,7 +2117,7 @@ static int input() else { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; + int offset = (int) (yy_c_buf_p - yytext_ptr); ++yy_c_buf_p; switch ( yy_get_next_buffer() ) diff --git a/innobase/pars/pars0lex.l b/innobase/pars/pars0lex.l index 811057d48a1..e481634f77e 100644 --- a/innobase/pars/pars0lex.l +++ b/innobase/pars/pars0lex.l @@ -31,6 +31,9 @@ How to make the InnoDB parser and lexer C files: 7. Add '#include "univ.i"' before #include in lexyy.c (Needed for AIX) +8. Add a type cast to int to the assignment below the comment + 'need more input.' (Removes a warning on Win64) + These instructions seem to work at least with bison-1.28 and flex-2.5.4 on Linux. *******************************************************/