Re: [igt-dev] [PATCH i-g-t 2/2] tests/perf: Fix build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>

On 28/02/18 10:08, Tvrtko Ursulin wrote:
From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Move variable declaration to top of scope to avoid C90 build warning.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
  tests/perf.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/perf.c b/tests/perf.c
index c302a355b850..78bf6cdd3504 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];


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux