All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH] lib/igt_kms: Fix mixed declarations warning
Date: Mon, 30 May 2022 11:50:03 +0300	[thread overview]
Message-ID: <YpSFO8qCfh4AzuaB@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20220530074036.3840581-1-bhanuprakash.modem@intel.com>

On Mon, May 30, 2022 at 01:10:36PM +0530, Bhanuprakash Modem wrote:
> Fix mixed declarations warning introduced by (58a5a2d5)
> 
> [214/1052] Compiling C object lib/libigt-igt_kms_c.a.p/igt_kms.c.o
> ../lib/igt_kms.c: In function ‘igt_display_require’:
> ../lib/igt_kms.c:2468:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>  2468 |   igt_output_t *output = igt_get_single_output_for_pipe(display, i);
>       |   ^~~~~~~~~~~~
> 
> Cc: Jessica Zhang <quic_jesszhan@quicinc.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

Reviewed-by: Petri Latvala <petri.latvala@intel.com>


> ---
>  lib/igt_kms.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 457462ec..a8a4fc7c 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -2498,11 +2498,12 @@ out:
>  
>  	for_each_pipe(display, i) {
>  		igt_pipe_t *pipe = &display->pipes[i];
> +		igt_output_t *output;
>  
>  		if (!igt_pipe_has_valid_output(display, i))
>  			continue;
>  
> -		igt_output_t *output = igt_get_single_output_for_pipe(display, i);
> +		output = igt_get_single_output_for_pipe(display, i);
>  
>  		if (pipe->num_primary_planes > 1) {
>  			igt_plane_t *primary = &pipe->planes[pipe->plane_primary];
> -- 
> 2.35.1
> 

  parent reply	other threads:[~2022-05-30  8:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30  7:40 [igt-dev] [PATCH] lib/igt_kms: Fix mixed declarations warning Bhanuprakash Modem
2022-05-30  8:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-05-30  8:50 ` Petri Latvala [this message]
2022-05-30 10:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YpSFO8qCfh4AzuaB@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.