diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2012-04-11 03:19:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-16 22:59:08 +0100 |
commit | 5612bf33391e839ed3efc1cf3a6794c1713cfdf7 (patch) | |
tree | 3a76e06a9ae750e739d9ef13f8dc9c17dbc7dbc0 /meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch | |
parent | a5afc58319d3c7e082a090f5fad7f89bd6e588c9 (diff) | |
download | poky-5612bf33391e839ed3efc1cf3a6794c1713cfdf7.tar.gz |
flex: backport Debian patches to fix generated code warnings
The generated parser had warnings regarding signess and return check
which makes Linux Kernel's perf tool from 3.4 release to fail without
those patches.
(From OE-Core rev: f3d7197252d1ede627a561fbd5b3b7fb759bf75b)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch')
-rw-r--r-- | meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch b/meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch new file mode 100644 index 0000000000..8d05ee467c --- /dev/null +++ b/meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | int is not the same size as size_t. | ||
2 | |||
3 | Signed-off-by: Manoj Srivastava <srivasta@debian.org> | ||
4 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
5 | |||
6 | Origin: Cherry picked from Debian | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | --- | ||
10 | gen.c | 2 +- | ||
11 | scan.c | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/gen.c b/gen.c | ||
15 | index 848e2c5..5a5daef 100644 | ||
16 | --- a/gen.c | ||
17 | +++ b/gen.c | ||
18 | @@ -1890,7 +1890,7 @@ void make_tables () | ||
19 | outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\"); | ||
20 | outn ("\t\t{ \\"); | ||
21 | outn ("\t\tint c = '*'; \\"); | ||
22 | - outn ("\t\tint n; \\"); | ||
23 | + outn ("\t\tsize_t n; \\"); | ||
24 | outn ("\t\tfor ( n = 0; n < max_size && \\"); | ||
25 | outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\"); | ||
26 | outn ("\t\t\tbuf[n] = (char) c; \\"); | ||
27 | diff --git a/scan.c b/scan.c | ||
28 | index 44559b6..15e2058 100644 | ||
29 | --- a/scan.c | ||
30 | +++ b/scan.c | ||
31 | @@ -2105,7 +2105,7 @@ static int input (void ); | ||
32 | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ | ||
33 | { \ | ||
34 | int c = '*'; \ | ||
35 | - int n; \ | ||
36 | + size_t n; \ | ||
37 | for ( n = 0; n < max_size && \ | ||
38 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ | ||
39 | buf[n] = (char) c; \ | ||
40 | -- | ||
41 | 1.7.9.5 | ||
42 | |||