summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2012-04-11 03:19:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-16 22:59:08 +0100
commit5612bf33391e839ed3efc1cf3a6794c1713cfdf7 (patch)
tree3a76e06a9ae750e739d9ef13f8dc9c17dbc7dbc0 /meta/recipes-devtools/flex/flex/int-is-not-the-same-size-as-size_t.patch
parenta5afc58319d3c7e082a090f5fad7f89bd6e588c9 (diff)
downloadpoky-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.patch42
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 @@
1int is not the same size as size_t.
2
3Signed-off-by: Manoj Srivastava <srivasta@debian.org>
4Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5
6Origin: Cherry picked from Debian
7Upstream-Status: Pending
8
9---
10 gen.c | 2 +-
11 scan.c | 2 +-
12 2 files changed, 2 insertions(+), 2 deletions(-)
13
14diff --git a/gen.c b/gen.c
15index 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; \\");
27diff --git a/scan.c b/scan.c
28index 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--
411.7.9.5
42