From: tip-bot for Arnaldo Carvalho de Melo <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: namhyung@kernel.org, tglx@linutronix.de, acme@redhat.com,
jolsa@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
mingo@kernel.org, adrian.hunter@intel.com, dsahern@gmail.com
Subject: [tip:perf/core] perf kmem: Fix compiler warning about may be accessing uninitialized variable
Date: Fri, 29 May 2015 11:36:00 -0700 [thread overview]
Message-ID: <tip-8e8rgbg3aom9uarsyqjrsctg@git.kernel.org> (raw)
Commit-ID: b236512280fb96dcca45a3f5bbae1839bd673e58
Gitweb: http://git.kernel.org/tip/b236512280fb96dcca45a3f5bbae1839bd673e58
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Fri, 29 May 2015 09:48:13 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.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@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-8e8rgbg3aom9uarsyqjrsctg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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)
next reply other threads:[~2015-05-29 18:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 18:36 tip-bot for Arnaldo Carvalho de Melo [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-15 6:42 tip-bot for Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-8e8rgbg3aom9uarsyqjrsctg@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®