[Spice-devel] [PATCH spice-server] red-qxl: Use proper formatting string for size_t

Christophe Fergeau cfergeau at redhat.com
Thu Jan 31 10:27:19 UTC 2019


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Thu, Jan 31, 2019 at 09:32:33AM +0000, Frediano Ziglio wrote:
> Avoids issues with LLP64 systems.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/red-qxl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/server/red-qxl.c b/server/red-qxl.c
> index 37f3d9c8..ddb98afb 100644
> --- a/server/red-qxl.c
> +++ b/server/red-qxl.c
> @@ -862,7 +862,8 @@ void spice_qxl_set_device_info(QXLInstance *instance,
>  
>      size_t da_len = strnlen(device_address, MAX_DEVICE_ADDRESS_LEN);
>      if (da_len >= MAX_DEVICE_ADDRESS_LEN) {
> -        spice_error("Device address too long: %lu > %u", da_len, MAX_DEVICE_ADDRESS_LEN);
> +        spice_error("Device address too long: %"G_GSIZE_FORMAT" > %u",
> +                    da_len, MAX_DEVICE_ADDRESS_LEN);
>          return;
>      }
>  
> -- 
> 2.20.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190131/2e250c55/attachment.sig>


More information about the Spice-devel mailing list