path: root/tools/perf/builtin-kmem.c
diff options
authorArnaldo Carvalho de Melo <>2015-05-29 09:48:13 -0300
committerArnaldo Carvalho de Melo <>2015-05-29 12:43:40 -0300
commitb236512280fb96dcca45a3f5bbae1839bd673e58 (patch)
tree012165e3a70a50828682fdcb851dcc983d1d1834 /tools/perf/builtin-kmem.c
parent427cde3287f2c6349f308d0e22c9223f9ea05ef1 (diff)
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 <> Cc: David Ahern <> Cc: Jiri Olsa <> Cc: Namhyung Kim <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/builtin-kmem.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 254614b10c4a..950f296dfcf7 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)