[igt-dev] [PATCH] lib/igt_kms: Fix mixed declarations warning
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Mon May 30 07:40:36 UTC 2022
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 at quicinc.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at 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
More information about the igt-dev
mailing list