[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-8e8rgbg3aom9uarsyqjrsctg@git.kernel.org>
Date: Fri, 29 May 2015 11:36:00 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: namhyung@...nel.org, tglx@...utronix.de, acme@...hat.com,
jolsa@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
mingo@...nel.org, adrian.hunter@...el.com, dsahern@...il.com
Subject: [tip:perf/core] perf kmem:
Fix compiler warning about may be accessing uninitialized variable
Commit-ID: b236512280fb96dcca45a3f5bbae1839bd673e58
Gitweb: http://git.kernel.org/tip/b236512280fb96dcca45a3f5bbae1839bd673e58
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Fri, 29 May 2015 09:48:13 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 29 May 2015 12:43:40 -0300
perf kmem: Fix compiler warning about may be accessing uninitialized variable
The last argument to strtok_r doesn't need to be initialized, its just a
placeholder to make this routine reentrant, but gcc doesn't know about
that and complains, breaking the build, fix it by setting it to NULL.
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: http://lkml.kernel.org/n/tip-8e8rgbg3aom9uarsyqjrsctg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-kmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 254614b..950f296 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -644,7 +644,7 @@ static char *compact_gfp_flags(char *gfp_flags)
{
char *orig_flags = strdup(gfp_flags);
char *new_flags = NULL;
- char *str, *pos;
+ char *str, *pos = NULL;
size_t len = 0;
if (orig_flags == NULL)
--
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