[Spice-devel] [vdagent-win PATCH v2] fix format string for Visual Studio
Christophe Fergeau
cfergeau at redhat.com
Mon Jul 24 16:05:09 UTC 2017
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Mon, Jul 24, 2017 at 04:57:53PM +0100, Frediano Ziglio wrote:
> The "z" size specifier is not supported by Visual Studio.
> Cast to unsigned long and use "l" specifier as the type has
> enough precision for this vector.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> vdagent/desktop_layout.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Changes since v1:
> - use cast instead of proper size specifier, much
> easier.
>
> diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp
> index 11ad009..a10d898 100644
> --- a/vdagent/desktop_layout.cpp
> +++ b/vdagent/desktop_layout.cpp
> @@ -147,7 +147,8 @@ void DesktopLayout::set_displays()
> break;
> }
> if (display_id >= _displays.size()) {
> - vd_printf("display_id %lu out of range, #displays %zu" , display_id, _displays.size());
> + vd_printf("display_id %lu out of range, #displays %lu",
> + display_id, (unsigned long) _displays.size());
> break;
> }
> DisplayMode * mode(_displays.at(display_id));
> --
> 2.13.3
>
> _______________________________________________
> 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: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170724/e6cf73ed/attachment.sig>
More information about the Spice-devel
mailing list