aboutsummaryrefslogtreecommitdiffstats
path: root/patches/build/modpost-mask-trivial-warnings.patch
blob: e7c8682355b83399120802f611eaf9effd08a9df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 1de72de61de403c164a6e0cf8e2b2fbe7379518b Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Sun, 25 Jan 2009 17:58:09 -0500
Subject: [PATCH] modpost: mask trivial warnings

Newer HOSTCC will complain about various stdio fcns because
they are now declared with "warn_unused_return", or because
some initializers aren't filled out with values -- trivially
assign values so we aren't overwhelmed with these warnings
once the kernel build kicks off.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 scripts/mod/modpost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6e892c93d104..80e998155459 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2010,7 +2010,7 @@ static void read_symbols(const char *modname)
 	char *license;
 	char *namespace;
 	struct module *mod;
-	struct elf_info info = { };
+	struct elf_info info = { .hdr = NULL };
 	Elf_Sym *sym;
 
 	if (!parse_elf(&info, modname))
@@ -2502,7 +2502,7 @@ static int dump_sym(struct symbol *sym)
 
 static void write_dump(const char *fname)
 {
-	struct buffer buf = { };
+	struct buffer buf = { NULL, 0, 0 };
 	struct symbol *symbol;
 	const char *namespace;
 	int n;
@@ -2556,7 +2556,7 @@ struct ext_sym_list {
 int main(int argc, char **argv)
 {
 	struct module *mod;
-	struct buffer buf = { };
+	struct buffer buf = { NULL, 0, 0 };
 	char *kernel_read = NULL;
 	char *missing_namespace_deps = NULL;
 	char *dump_write = NULL, *files_source = NULL;
-- 
2.19.1