[igt-dev] [PATCH i-g-t 1/1] tests/kms_cursor_legacy: Fix build warning
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Thu Nov 4 07:25:44 UTC 2021
On Thu, Nov 04, 2021 at 08:48:48AM +0200, Petri Latvala wrote:
> ../tests/kms_cursor_legacy.c: In function ‘flip_vs_cursor_busy_crc’:
> ../tests/kms_cursor_legacy.c:1337:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
> 1337 | uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0);
> | ^~~~~~~~
>
> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
> Cc: Mark Yacoub <markyacoub at chromium.org>
> Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
> ---
> tests/kms_cursor_legacy.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
> index e48cdf6c..cd2f8498 100644
> --- a/tests/kms_cursor_legacy.c
> +++ b/tests/kms_cursor_legacy.c
> @@ -1333,8 +1333,10 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic)
> igt_pipe_t *pipe_connected = &display->pipes[pipe];
> igt_plane_t *plane_primary = igt_pipe_get_plane_type(pipe_connected, DRM_PLANE_TYPE_PRIMARY);
> igt_crc_t crcs[2], test_crc;
> + uint64_t ahnd;
> +
> igt_require_intel(display->drm_fd);
> - uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0);
> + ahnd = get_reloc_ahnd(display->drm_fd, 0);
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
>
> if (atomic)
> igt_require(display->is_atomic);
> --
> 2.29.2
>
More information about the igt-dev
mailing list