[PATCH i-g-t] tests/kms_async_flips: Fix compilation warning
Karthik B S
karthik.b.s at intel.com
Fri Jun 27 09:25:52 UTC 2025
Hi Kamil,
We've a patch from Santhosh already for this one.
https://patchwork.freedesktop.org/series/150847/
Thanks,
Karthik.B.S
On 6/27/2025 2:41 PM, Kamil Konieczny wrote:
> Fix compiler warning:
>
> Compiling C object tests/kms_async_flips.p/kms_async_flips.c.o
> ../tests/kms_async_flips.c: In function 'skip_async_format_mod':
> ../tests/kms_async_flips.c:874:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
> 874 | struct format_mod rf = {
> | ^~~~~~
>
> Cc: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
> Cc: Chaitanya Kumar Borah <chaitanya.kumar.borah at intel.com>
> Cc: Karthik B S <karthik.b.s at intel.com>
> Fixes: aa4b2e0b81d2 ("tests/kms_async_flips: Add test for all async format modifiers")
> Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
> tests/kms_async_flips.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index dc3a0f92a..97f90733d 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -860,6 +860,8 @@ static bool skip_async_format_mod(data_t *data,
> uint32_t format, uint64_t modifier,
> struct igt_vec *tested_formats)
> {
> + struct format_mod rf;
> +
> /* igt doesn't know how to sw generate UBWC: */
> if (is_msm_device(data->drm_fd) &&
> modifier == DRM_FORMAT_MOD_QCOM_COMPRESSED)
> @@ -871,10 +873,8 @@ static bool skip_async_format_mod(data_t *data,
> return true;
>
> /* test each format "class" only once in non-extended tests */
> - struct format_mod rf = {
> - .format = igt_reduce_format(format),
> - .modifier = modifier,
> - };
> + rf.format = igt_reduce_format(format);
> + rf.modifier = modifier;
>
> if (igt_vec_index(tested_formats, &rf) >= 0)
> return true;
More information about the igt-dev
mailing list