summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch')
-rw-r--r--meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch b/meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch
new file mode 100644
index 0000000000..ed61ea16fe
--- /dev/null
+++ b/meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch
@@ -0,0 +1,53 @@
1exports.*: fix warnings.
2
3Fix these warnings:
4lex.yy.c:1207: warning: 'yyunput' defined but not used
5lex.yy.c:1248: warning: 'input' defined but not used
6exports.y: In function 'set_hostname':
7exports.y:334: warning: large integer implicitly truncated to unsigned type
8exports.y: In function 'set_ipaddr':
9exports.y:350: warning: large integer implicitly truncated to unsigned type
10
11Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
12
13Upstream-Status: Pending
14
15---
16 Config/exports.l | 3 +++
17 Config/exports.y | 6 ++++--
18 2 files changed, 7 insertions(+), 2 deletions(-)
19
20--- a/Config/exports.l
21+++ b/Config/exports.l
22@@ -48,6 +48,9 @@ NETCOMP [0-9]{1,2}
23 NET {IP}"/"{NETCOMP}
24 OLDNET {IP}"/"{IP}
25
26+%option nounput
27+%option noinput
28+
29 %%
30
31 ^{WHITE}*\n { /* eat empty line */ }
32--- a/Config/exports.y
33+++ b/Config/exports.y
34@@ -331,7 +331,8 @@ static void set_hostname(const char *nam
35 if (ent) {
36 memcpy(&cur_host.addr, ent->h_addr_list[0],
37 sizeof(struct in_addr));
38- cur_host.mask.s_addr = ~0UL;
39+ cur_host.mask.s_addr = 0;
40+ cur_host.mask.s_addr = ~cur_host.mask.s_addr;
41 } else {
42 logmsg(LOG_CRIT, "could not resolve hostname '%s'", name);
43 e_error = TRUE;
44@@ -347,7 +348,8 @@ static void set_ipaddr(const char *addr)
45
46 if (!inet_aton(addr, &cur_host.addr))
47 e_error = TRUE;
48- cur_host.mask.s_addr = ~0UL;
49+ cur_host.mask.s_addr = 0;
50+ cur_host.mask.s_addr = ~cur_host.mask.s_addr;
51 }
52
53 /*