[Spice-devel] [PATCH spice-gtk v5 2/5] Avoid clang warnings on casts with stricter alignment requirements

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin For example, something like this: uint8_t *p8; uint32_t *p32 = (uint32_t *) p8; generates a warning like this: spice-channel.c:1350:10: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *')

[Spice-devel] [PATCH spice-gtk v5 0/5] Repair macOS builds for spice-gtk

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin This patch set contains various fixes that repair macOS builds for spice-gtk (and presumably clang builds as a side effect), notably: - Fixes for clang-specific warnings, notably on alignment - Addition of macOS detection in configure script - A

[Spice-devel] [PATCH spice-gtk v5 3/5] Avoid warning about snprintf on non-Linux platforms

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin Without #include , calls to snprintf in the file cause a warning. The file is left aside on purpose, since src/usbutil.c may be compiled on Windows where this file does not exist. Signed-off-by: Christophe de Dinechin ---

[Spice-devel] [PATCH v4 0/3] macOS enablement patches

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin This patch set eliminates warnings detected by clang with respect to type alignments. Vittorio Toso had submitted something similar. In this version, I took into account comments by Christophe Fergeau regarding how to know which casts were

[Spice-devel] [PATCH spice-gtk v5 1/5] Add check for macOS

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- configure.ac | 15 +++ 1 file changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index ff00d73..62acafc 100644 --- a/configure.ac +++ b/configure.ac @@

[Spice-devel] [PATCH spice-gtk v5 5/5] Add configure option --enable-alignment-checks

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- configure.ac | 8 spice-common | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 62acafc..caa289a 100644 ---

[Spice-devel] [PATCH spice-gtk v5 4/5] Remove warning about unused variable when building on macOS

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin On macOS, neither of the two cases implemented in set_mouse_accel applies. We get the following eror message: CC spice-widget.lo spice-widget.c:944:26: error: unused variable 'd' [-Werror,-Wunused-variable] SpiceDisplayPrivate *d =

Re: [Spice-devel] [PATCH spice-gtk v5 3/5] Avoid warning about snprintf on non-Linux platforms

2017-05-30 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > Without #include , calls to snprintf in the file > cause a warning. The file is left aside on purpose, > since src/usbutil.c may be compiled on Windows where this > file does not exist. > > Signed-off-by: Christophe de Dinechin

Re: [Spice-devel] [PATCH spice-gtk v5 3/5] Avoid warning about snprintf on non-Linux platforms

2017-05-30 Thread Christophe de Dinechin
> On 30 May 2017, at 14:57, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> Without #include , calls to snprintf in the file >> cause a warning. The file is left aside on purpose, >> since src/usbutil.c may be compiled on Windows

[Spice-devel] [PATCH v4 3/3] Add configure option for --enable-alignment-checks

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- configure.ac | 8 1 file changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 6d9f378..efd7317 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6

[Spice-devel] [PATCH v4 2/3] Put alignment checks under #ifdef SPICE_DEBUG_ALIGNMENT

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin Signed-off-by: Christophe de Dinechin --- common/mem.c | 3 +-- common/mem.h | 27 ++- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/common/mem.c b/common/mem.c index

[Spice-devel] [PATCH v4 1/3] Avoid clang warnings on casts with stricter alignment requirements

2017-05-30 Thread Christophe de Dinechin
From: Christophe de Dinechin For example, something like this: uint8_t *p8; uint32_t *p32 = (uint32_t *) p8; generates a warning like this: spice-channel.c:1350:10: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *')

[Spice-devel] Role of spice_logger

2017-05-30 Thread Christophe de Dinechin
I’m looking at logging functions in log.c, and I wonder why we disable logging only at the spice_logger level. There is a test like this in spice_logger: if (glib_debug_level != 0) { if ((log_level & G_LOG_LEVEL_MASK) > glib_debug_level) return; // do not print anything

Re: [Spice-devel] Role of spice_logger

2017-05-30 Thread Frediano Ziglio
> > I’m looking at logging functions in log.c, and I wonder why we disable > logging only at the spice_logger level. > > There is a test like this in spice_logger: > > if (glib_debug_level != 0) { > if ((log_level & G_LOG_LEVEL_MASK) > glib_debug_level) > return; // do

Re: [Spice-devel] [PATCH spice-gtk v5 4/5] Remove warning about unused variable when building on macOS

2017-05-30 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > On macOS, neither of the two cases implemented in set_mouse_accel applies. > We get the following eror message: > > CC spice-widget.lo > spice-widget.c:944:26: error: unused variable 'd' [-Werror,-Wunused-variable] >

Re: [Spice-devel] [PATCH spice-gtk v5 3/5] Avoid warning about snprintf on non-Linux platforms

2017-05-30 Thread Christophe Fergeau
On Tue, May 30, 2017 at 03:03:17PM +0200, Christophe de Dinechin wrote: > > > On 30 May 2017, at 14:57, Frediano Ziglio wrote: > > > >> > >> From: Christophe de Dinechin > >> > >> Without #include , calls to snprintf in the file > >> cause a warning.

Re: [Spice-devel] [PATCH spice-gtk v5 2/5] Avoid clang warnings on casts with stricter alignment requirements

2017-05-30 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > For example, something like this: > uint8_t *p8; > uint32_t *p32 = (uint32_t *) p8; > > generates a warning like this: > spice-channel.c:1350:10: error: cast from 'uint8_t *' (aka 'unsigned char > *') to > 'uint32_t

Re: [Spice-devel] [PATCH spice-protocol v2] agent: Add new file-xfer statuses

2017-05-30 Thread Pavel Grunt
Hi Jakub, you should also list these in the comment describing the data type of the result (the data type here is "none" but the comment lists results covered by VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS) - sorry I forgot to mention that in the first review. Besides that it looks good to me.