Re: [PATCH 1/6] perf probe: Add missing variable initialization

From: Masami Hiramatsu
Date: Fri Mar 05 2010 - 11:02:43 EST


Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> cc1: warnings being treated as errors
> util/probe-finder.c: In function âfind_line_rangeâ:
> util/probe-finder.c:172: warning: âsrcâ may be used uninitialized in this function
> make: *** [util/probe-finder.o] Error 1

Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>

Thank you!

>
> Cc: FrÃdÃric Weisbecker <fweisbec@xxxxxxxxx>
> Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
> Cc: Mike Galbraith <efault@xxxxxx>
> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> ---
> tools/perf/util/probe-finder.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index e77dc88..1e6c65e 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -169,7 +169,7 @@ static const char *cu_find_realpath(Dwarf_Die *cu_die, const char *fname)
> {
> Dwarf_Files *files;
> size_t nfiles, i;
> - const char *src;
> + const char *src = NULL;
> int ret;
>
> if (!fname)

--
Masami Hiramatsu
e-mail: mhiramat@xxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/