Patchwork [03/10,v6] tools/perf: silence compiler warnings

login
register
mail settings
Submitter sukadev@linux.vnet.ibm.com
Date Oct. 16, 2013, 2:06 a.m.
Message ID <1381889202-16826-4-git-send-email-sukadev@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/283820/
State New
Delegated to: Michael Ellerman
Headers show

Comments

sukadev@linux.vnet.ibm.com - Oct. 16, 2013, 2:06 a.m.
The uninitialized variables cause warnings which are treated as errors
during build (without WERROR=0).

Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
 tools/perf/util/srcline.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 10983a9..0477055 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -223,8 +223,8 @@  out:
 
 char *get_srcline(struct dso *dso, unsigned long addr)
 {
-	char *file;
-	unsigned line;
+	char *file = NULL;
+	unsigned line = 0;
 	char *srcline;
 	char *dso_name = dso->long_name;
 	size_t size;