public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_prime: Fix compiler warning
@ 2019-09-18  9:59 Mika Kahola
  2019-09-18 10:35 ` Petri Latvala
  2019-09-18 12:18 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Mika Kahola @ 2019-09-18  9:59 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

Fix compiler warning about

../tests/kms_prime.c: In function ‘setup_display’:
../tests/kms_prime.c:74:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
  igt_output_t *output = igt_get_single_output_for_pipe(display, pipe);

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_prime.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/kms_prime.c b/tests/kms_prime.c
index 17599573..3241c514 100644
--- a/tests/kms_prime.c
+++ b/tests/kms_prime.c
@@ -69,9 +69,11 @@ static bool has_prime_export(int fd)
 static igt_output_t *setup_display(int importer_fd, igt_display_t *display,
 				   enum pipe pipe)
 {
+	igt_output_t *output;
+
 	igt_display_require(display, importer_fd);
 	igt_skip_on(pipe >= display->n_pipes);
-	igt_output_t *output = igt_get_single_output_for_pipe(display, pipe);
+	output = igt_get_single_output_for_pipe(display, pipe);
 
 	igt_require_f(output, "No connector found for pipe %s\n",
 		      kmstest_pipe_name(pipe));
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-23 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-18  9:59 [igt-dev] [PATCH i-g-t] tests/kms_prime: Fix compiler warning Mika Kahola
2019-09-18 10:35 ` Petri Latvala
2019-09-23 10:51   ` Kahola, Mika
2019-09-18 12:18 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox