Re: [PATCH spice-server] Use PRIxPTR constant for string formatting

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

 



> On Tue, Sep 18, 2018 at 05:56:03AM -0400, Frediano Ziglio wrote:
> > > 
> > > Hey,
> > > 
> > > On Fri, Jun 22, 2018 at 11:28:50AM +0100, Frediano Ziglio wrote:
> > > > These constant are meant to be used in format string for size_t
> > > 
> > > These constants are actually meant for printing uintptr_t, not size_t,
> > > the former is 32 bits on 32 bits systems, and size_t can be 64 bits
> > > there, see https://github.com/freedesktop/spice/pull/1/commits
> > > 
> > > %z is actually C99, and is supported by newer VC++ versions
> > > (
> > > https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=vs-2017
> > > ), so I'd tend to switch back to %z, ie revert most of this patch.
> > 
> > Please don't do it, we use more MingW and MingW tend to use the old msvcrt
> > which is not much updated,
> > so no %z there.
> 
> Hmm, I'm the one who mentioned Windows, but this is about spice-server
> which has a hard dep on gio-unix anyway. So I'd still switch back to %z,
> and adjust the location causing the warning to %lu.
> 
> Christophe
> 

Not much deep, I already ported it to Windows...

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




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