]> Git Repo - linux.git/commit
perf top: Fix uninitialized 'counter' variable
authorAkihiro Nagai <[email protected]>
Wed, 23 Mar 2011 07:29:39 +0000 (16:29 +0900)
committerIngo Molnar <[email protected]>
Wed, 23 Mar 2011 09:38:32 +0000 (10:38 +0100)
commitce2d17ca7f85dcade62cd608601a0d52ccdaf0e6
tree134a4c4a825ff765eed239df643eed5403a3614d
parente1eb029081f9cd4f73bdd05d495e5011839546f5
perf top: Fix uninitialized 'counter' variable

builtin-top.c has an uninitialized variable.
gcc(version 4.5.1) warns about it and it results in build failure:

 builtin-top.c: In function 'display_thread':
 builtin-top.c:518:9: error: 'counter' may be used uninitialized

This situation can indeed trigger, if the getline() call in
prompt_integer() fails.

Signed-off-by: Akihiro Nagai <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
LKML-Reference: <20110323072939[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
tools/perf/builtin-top.c
This page took 0.053569 seconds and 4 git commands to generate.