Re: [PATCH] drmmode: Fix compilation warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ack, 

----- Original Message -----
> One recent change introduced a gcc compilation warning:
> 
>   CC       qxl_drmmode.lo
> qxl_drmmode.c: In function 'drmmode_set_mode_major':
> qxl_drmmode.c:251:9: error: ISO C90 forbids mixed declarations and code
> [-Werror=declaration-after-statement]
>          CursorPtr cursor = xf86_config->cursor;
> 
> This commit moves the CursorPtr declaration to the top of the
> drmmode_set_mode_major function in order to fix that warning.
> ---
>  src/qxl_drmmode.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qxl_drmmode.c b/src/qxl_drmmode.c
> index e9d6436..f8d5369 100644
> --- a/src/qxl_drmmode.c
> +++ b/src/qxl_drmmode.c
> @@ -132,6 +132,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr
> mode,
>  		     Rotation rotation, int x, int y)
>  {
>  	ScrnInfoPtr pScrn = crtc->scrn;
> +	CursorPtr cursor;
>  	xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
>  	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
>  	drmmode_ptr drmmode = drmmode_crtc->drmmode;
> @@ -248,7 +249,7 @@ done:
>  		crtc->active = TRUE;
>  #endif
>  
> -        CursorPtr cursor = xf86_config->cursor;
> +        cursor = xf86_config->cursor;
>          if (cursor)
>              drmmode_show_cursor(crtc);
>  
> --
> 2.1.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]