Skip to contentSkip to conversation

tests/drv_hangman: Fix uninitialized tail usage

PATCH New Mika Kuoppala 1 participant 1 message Oct 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/drv_hangman: Fix uninitialized tail usage

Tail needs to be in outer scope as it is used after loop continuation destroying its scope.

---
 tests/drv_hangman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/drv_hangman.c +1 -1
index 6caf910..280f903 100644
@@ -240,6 +240,7 @@ static void check_error_state(const int gen,
 	size_t line_size = 0;
 	char *ring_name = NULL;
 	bool bb_ok = false, req_ok = false, ringbuf_ok = false;
+	uint32_t tail;
 
 	debug_fd = igt_debugfs_open("i915_error_state", O_RDONLY);
 	igt_assert_lte(0, debug_fd);
@@ -252,7 +253,6 @@ static void check_error_state(const int gen,
 		uint64_t gtt_offset;
 		int req_matched = 0;
 		int requests;
-		uint32_t tail;
 		int ringbuf_matched = 0;
 		int i, items;
 
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx