lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130912131649.GC23826@gmail.com>
Date:	Thu, 12 Sep 2013 15:16:49 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	hpa@...or.com, paulus@...ba.org, eranian@...gle.com,
	linux-kernel@...r.kernel.org, acme@...hat.com, efault@....de,
	peterz@...radead.org, namhyung@...il.com, jolsa@...hat.com,
	fweisbec@...il.com, dsahern@...il.com, adrian.hunter@...el.com,
	tglx@...utronix.de
Cc:	linux-tip-commits@...r.kernel.org
Subject: [PATCH] Fix old GCC build error in
 perf/util/trace-event-parse.c:parse_proc_kallsyms()


Old GCC (4.1) does not see through the code flow of parse_proc_kallsyms() 
and gets confused about the status of 'fmt':

 util/trace-event-parse.c: In function ‘parse_proc_kallsyms’:
 util/trace-event-parse.c:189: warning: ‘fmt’ may be used uninitialized in this function
 make: *** [util/trace-event-parse.o] Error 1

Help out GCC by initializing 'fmt' to NULL.

Thanks,

	Ingo

Signed-off-by: Ingo Molnar <mingo@...nel.org>

diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index fe7a27d..e9e1c03 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -186,7 +186,7 @@ void parse_proc_kallsyms(struct pevent *pevent,
 	char *next = NULL;
 	char *addr_str;
 	char *mod;
-	char *fmt;
+	char *fmt = NULL;
 
 	line = strtok_r(file, "\n", &next);
 	while (line) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ