summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2018-02-28 10:08:00 +0000
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2018-02-28 12:33:00 +0000
commit0d47ec161b4eca1b41c5348604aa05b105e5d1cf (patch)
tree272d766a893ac3db6d2eef0255b2c4059b879232
parentb0bc51019230bb4a2be5d5a96f8b48af634a39e7 (diff)
tests/perf: Fix build warning
Move variable declaration to top of scope to avoid C90 build warning. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-rw-r--r--tests/perf.c2
1 files changed, 1 insertions, 1 deletions
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];