[Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

Frediano Ziglio fziglio at redhat.com
Wed Jul 19 09:59:12 UTC 2017


> 
> On Wed, Jul 19, 2017 at 10:23:30AM +0200, Christophe de Dinechin wrote:
> > 
> > > On 18 Jul 2017, at 17:28, Christophe Fergeau <cfergeau at redhat.com> wrote:
> > > 
> > > On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano Ziglio wrote:
> > >> Remove CxImage linking.
> > >> Support Windows BMP format.
> > > 
> > > Too bad there is no small/maintained library which would do that for us
> > > :-/ From a quick glance, looks ok.
> > > 
> > > 
> > >> 
> > >> +static inline size_t compute_dib_stride(unsigned width, unsigned
> > >> bit_count)
> > > 
> > > Can you use full type names, unsigned int?
> > 
> > No. Really, no ;-) Otherwise, for consistency, you should replace ‘int’
> > with ‘signed int’,
> 
> The way I see it, 'signed'/'unsigned' are type modifiers, 'int' is an actual
> type name.
> Huge difference to me. With just "unsigned", which is unusual in the
> code I've seen in the past, you cannot guess the range of the values you
> can store in there. So let's just be specific.
> 
> Christophe
> 

Even long is a modifier, however in spice-server:

$ cgrep -w 'long' | wc -l
579
$ cgrep 'long int' | wc -l
3

So... why not for long?

And by the way, is standard C and in C++ is even normal to just see
unsigned without int.

Frediano


More information about the Spice-devel mailing list