diff options
author | Mike Galbraith <efault@gmx.de> | 2009-06-02 05:04:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-02 05:11:26 -0400 |
commit | 10a2825514a988225ac2e336c7a9502c4ca57c39 (patch) | |
tree | f166a4361b9ea8e6fe921f1f8397a93382816009 /Documentation/perf_counter | |
parent | c1079abd1d5e66edabeb04d75e48e604cd8c167f (diff) |
perf_counter tools: Fix uninitialized variable in perf-report.c
# make prefix=/usr/local V=1
gcc -o builtin-report.o -c -O2 -ggdb3 -Wall -Werror -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -DSHA1_HEADER='<openssl/sha.h>' builtin-report.c
cc1: warnings being treated as errors
builtin-report.c: In function ‘__cmd_report’:
builtin-report.c:626: error: ‘cwdlen’ may be used uninitialized in this function
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <new-submission>
Diffstat (limited to 'Documentation/perf_counter')
-rw-r--r-- | Documentation/perf_counter/builtin-report.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/perf_counter/builtin-report.c b/Documentation/perf_counter/builtin-report.c index 7973092094e1..20a4e519dfd1 100644 --- a/Documentation/perf_counter/builtin-report.c +++ b/Documentation/perf_counter/builtin-report.c | |||
@@ -653,8 +653,10 @@ static int __cmd_report(void) | |||
653 | return EXIT_FAILURE; | 653 | return EXIT_FAILURE; |
654 | } | 654 | } |
655 | cwdlen = strlen(cwd); | 655 | cwdlen = strlen(cwd); |
656 | } else | 656 | } else { |
657 | cwdp = NULL; | 657 | cwdp = NULL; |
658 | cwdlen = 0; | ||
659 | } | ||
658 | remap: | 660 | remap: |
659 | buf = (char *)mmap(NULL, page_size * mmap_window, PROT_READ, | 661 | buf = (char *)mmap(NULL, page_size * mmap_window, PROT_READ, |
660 | MAP_SHARED, input, offset); | 662 | MAP_SHARED, input, offset); |