• Akihiro Nagai's avatar
    perf top: Fix uninitialized 'counter' variable · ce2d17ca
    Akihiro Nagai authored
    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: default avatarAkihiro Nagai <akihiro.nagai.hw@hitachi.com>
    Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
    Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    LKML-Reference: <20110323072939.11638.50173.stgit@localhost6.localdomain6>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    ce2d17ca
builtin-top.c 26.8 KB