From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
To: Taeung Song <treeze.taeung@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Wang Nan <wangnan0@huawei.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Jiri Olsa <jolsa@redhat.com>,
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Subject: Re: [PATCH 4/4] perf annotate: Introduce source_code to collect actual code
Date: Fri, 24 Feb 2017 11:27:42 +0530 [thread overview]
Message-ID: <58AFCB56.1020502@linux.vnet.ibm.com> (raw)
In-Reply-To: <1487758103-7953-5-git-send-email-treeze.taeung@gmail.com>
Hi Taeung,
On Wednesday 22 February 2017 03:38 PM, Taeung Song wrote:
> + INIT_LIST_HEAD(¬es->src->code);
> +
> + while (!feof(file)) {
> + int nr;
> + char *c, *parsed_line;
> + struct source_code *code;
> +
> + if (getline(&line, &len, file) < 0) {
> + symbol__free_source_code(sym);
> + break;
> + }
> +
> + if (++nr < first_linenr)
Please initialize variable nr. I got a compilation error:
util/annotate.c: In function ‘symbol__tty_annotate’:
util/annotate.c:1674:6: error: ‘nr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (++nr < first_linenr)
^
util/annotate.c:1665:7: note: ‘nr’ was declared here
int nr;
^
Ravi
prev parent reply other threads:[~2017-02-24 5:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 10:08 [PATCH 0/4] perf annotate: Fixes for line numbers and Introduce source_code Taeung Song
2017-02-22 10:08 ` [PATCH 1/4] perf annotate: Remove needless regular expression for filename:linenr Taeung Song
2017-02-22 10:47 ` Namhyung Kim
2017-02-22 16:00 ` Taeung Song
2017-02-22 10:08 ` [PATCH 2/4] perf annotate: Align filename:linenr and more correct summary Taeung Song
2017-02-22 11:12 ` Namhyung Kim
2017-02-22 11:22 ` Namhyung Kim
2017-02-22 16:31 ` Taeung Song
2017-02-22 10:08 ` [PATCH 3/4] perf annotate: Change the method counting line numbers Taeung Song
2017-02-22 10:08 ` [PATCH 4/4] perf annotate: Introduce source_code to collect actual code Taeung Song
2017-02-22 11:27 ` Namhyung Kim
2017-02-22 16:41 ` Taeung Song
2017-02-24 5:57 ` Ravi Bangoria [this message]
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=58AFCB56.1020502@linux.vnet.ibm.com \
--to=ravi.bangoria@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=treeze.taeung@gmail.com \
--cc=wangnan0@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.