aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShunsuke Nakamura <[email protected]>2021-10-06 18:57:03 +0900
committerArnaldo Carvalho de Melo <[email protected]>2021-10-14 15:41:35 -0300
commitf304c8d949f9adc2ef51304b63e49d5ea1c2d288 (patch)
tree8c033cac7ddd8c4f919c217bcb05363f2fb41255
parent8e820f962345e6ce6f4677044209f23dde39d76d (diff)
libperf test evsel: Fix build error on !x86 architectures
In test_stat_user_read, following build error occurs except i386 and x86_64 architectures: tests/test-evsel.c:129:31: error: variable 'pc' set but not used [-Werror=unused-but-set-variable] struct perf_event_mmap_page *pc; Fix build error. Signed-off-by: Shunsuke Nakamura <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/lib/perf/tests/test-evsel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/perf/tests/test-evsel.c b/tools/lib/perf/tests/test-evsel.c
index a184e4861627..9abd4c0bf6db 100644
--- a/tools/lib/perf/tests/test-evsel.c
+++ b/tools/lib/perf/tests/test-evsel.c
@@ -148,6 +148,7 @@ static int test_stat_user_read(int event)
__T("failed to mmap evsel", err == 0);
pc = perf_evsel__mmap_base(evsel, 0, 0);
+ __T("failed to get mmapped address", pc);
#if defined(__i386__) || defined(__x86_64__)
__T("userspace counter access not supported", pc->cap_user_rdpmc);