Commit 9f3f7cef authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Fix warnings in generated lex.yy.c file

Also note them in the README.txt for future reference.

Change-Id: I3a99670a2717369e7d91df5a2c3ce5f0c7dd9c40
parent 99101fdf
......@@ -27,6 +27,15 @@ c) Remove blank lines at the beginning and end of the file
d) Replace "int yyl;" with "yy_size_t yyl;", e.g. :%s/int yyl;/yy_size_t yyl;/
e) Remove any instances of the "register" keyword.
Some known warnings with recent flex/gcc:
- Add the following code if not already present to avoid warnings about
isatty being used without a declaration:
#ifndef __cplusplus
extern int isatty(int);
#endif /* __cplusplus */
- Change 'int i;' to 'yy_size_t i;' in yy_scan_bytes (line ~3700).
Step "d" removes a potential signed/unsigned comparison compiler
warning. It might not be necessary in later versions of flex.
......
......@@ -24,6 +24,10 @@
/* end standard C headers. */
#ifndef __cplusplus
extern int isatty(int);
#endif /* __cplusplus */
/* flex integer type definitions */
#ifndef FLEXINT_H
......@@ -3701,7 +3705,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment