[igt-dev] [PATCH i-g-t] tests/kms_prime: Fix compiler warning
Kahola, Mika
mika.kahola at intel.com
Mon Sep 23 10:51:47 UTC 2019
Pushed. Thanks for the review!
On Wed, 2019-09-18 at 13:35 +0300, Petri Latvala wrote:
> On Wed, Sep 18, 2019 at 12:59:19PM +0300, Mika Kahola wrote:
> > 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 at intel.com>
>
> Reviewed-by: Petri Latvala <petri.latvala at 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 at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
More information about the igt-dev
mailing list