From 0d47ec161b4eca1b41c5348604aa05b105e5d1cf Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Wed, 28 Feb 2018 10:08:00 +0000 Subject: tests/perf: Fix build warning Move variable declaration to top of scope to avoid C90 build warning. Signed-off-by: Tvrtko Ursulin Reviewed-by: Lionel Landwerlin --- tests/perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/perf.c') diff --git a/tests/perf.c b/tests/perf.c index c302a355..78bf6cdd 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -1726,6 +1726,7 @@ test_oa_exponents(void) int buf_size = sample_size * max_reports * 1.5; uint8_t *buf = calloc(1, buf_size); int ret, n_timer_reports = 0; + uint32_t matches = 0; struct { uint32_t report[64]; } timer_reports[30]; @@ -1785,7 +1786,6 @@ test_oa_exponents(void) igt_debug("report%04i ts=%08x hw_id=0x%08x\n", 0, timer_reports[0].report[1], oa_report_get_ctx_id(timer_reports[0].report)); - uint32_t matches = 0; for (int i = 1; i < n_timer_reports; i++) { uint32_t delta = timer_reports[i].report[1] - timer_reports[i - 1].report[1]; -- cgit v1.2.3