Re: [Spice-devel] [PATCH v1 09/33] drm/qxl: drop use of drmP.h

2019-07-15 Thread Sam Ravnborg
On Mon, Jul 01, 2019 at 08:38:43AM +0200, Gerd Hoffmann wrote: > On Sun, Jun 30, 2019 at 08:18:58AM +0200, Sam Ravnborg wrote: > > Drop use of the deprecated drmP.h header file. > > While touching the files divided includes in blocks, > > and when needed sort the blocks. > > Fix fallout. > > > > S

Re: [Spice-devel] [spice-gtk 4/5] usb-redir: delete usb-backend context on initialization error

2019-07-15 Thread Frediano Ziglio
> > On Mon, Jul 15, 2019 at 5:04 PM Frediano Ziglio wrote: > > > > > > > > The delete in error flow was missing. > > > > > > Signed-off-by: Yuri Benditovich > > > --- > > > src/usb-device-manager.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/src/usb-device-manager.c b/s

Re: [Spice-devel] [spice-gtk 4/5] usb-redir: delete usb-backend context on initialization error

2019-07-15 Thread Yuri Benditovich
On Mon, Jul 15, 2019 at 5:04 PM Frediano Ziglio wrote: > > > > > The delete in error flow was missing. > > > > Signed-off-by: Yuri Benditovich > > --- > > src/usb-device-manager.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c >

Re: [Spice-devel] [spice-gtk 1/5] build: require minimal libusb version 1.0.21

2019-07-15 Thread Frediano Ziglio
> > Previous commit ca641a5b92 uses libusb_interrupt_event_handler > which requires newer version of libusb. > > Signed-off-by: Yuri Benditovich My fault. According to repology this should not be an issue. Fine for me. > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

Re: [Spice-devel] [spice-gtk 3/5] usb-redir: pass GError to hotplug registration procedure

2019-07-15 Thread Frediano Ziglio
> > In case of possible error the procedure of hotplug > registration does not return error information, just > issues warning to the stderr, so the reason of the problem, > if any, is not visible. Current commit adds GError parameter > to the procedure to return the error details conventionally.

Re: [Spice-devel] [spice-gtk 4/5] usb-redir: delete usb-backend context on initialization error

2019-07-15 Thread Frediano Ziglio
> > The delete in error flow was missing. > > Signed-off-by: Yuri Benditovich > --- > src/usb-device-manager.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c > index 857d057..7105ff1 100644 > --- a/src/usb-device-manager.c > +++ b/s

[Spice-devel] [PATCH vd_agent_linux 3/3] x11: Constify XEvent argument

2019-07-15 Thread Frediano Ziglio
No reasons to have it mutable. Signed-off-by: Frediano Ziglio --- src/vdagent/x11.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/vdagent/x11.c b/src/vdagent/x11.c index 42f42e7..966ea62 100644 --- a/src/vdagent/x11.c +++ b/src/vdagent/x11.c @@

[Spice-devel] [PATCH vd_agent_linux 2/3] x11: Avoid passing XEvent as value

2019-07-15 Thread Frediano Ziglio
The structure is not that small and is not necessary to copy the value. This also removed a Coverity warning. Signed-off-by: Frediano Ziglio --- src/vdagent/x11.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/vdagent/x11.c b/

[Spice-devel] [PATCH vd_agent_linux 1/3] x11-randr: Avoid passing XEvent as value

2019-07-15 Thread Frediano Ziglio
The structure is not that small and is not necessary to copy the value. This also removed a Coverity warning. Signed-off-by: Frediano Ziglio --- src/vdagent/x11-priv.h | 2 +- src/vdagent/x11-randr.c | 8 src/vdagent/x11.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)

Re: [Spice-devel] [linux/vd-agent v1 6/7] x11-randr: simplest fix for address-of-packed-member

2019-07-15 Thread Frediano Ziglio
> > Hi, > > On Mon, Jul 15, 2019 at 05:18:17AM -0400, Frediano Ziglio wrote: > > > > > > From: Victor Toso > > > > > > The struct type for width/height is uint32_t while we are trying to > > > access and change it with int* - code can be improved a bit in following > > > patches but this one f

Re: [Spice-devel] [linux/vd-agent v1 6/7] x11-randr: simplest fix for address-of-packed-member

2019-07-15 Thread Victor Toso
Hi, On Mon, Jul 15, 2019 at 05:18:17AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > The struct type for width/height is uint32_t while we are trying to > > access and change it with int* - code can be improved a bit in following > > patches but this one fixes the warning by c

Re: [Spice-devel] [linux/vd-agent v1 5/7] coverity: allow pass by value with XEvent

2019-07-15 Thread Victor Toso
On Mon, Jul 15, 2019 at 05:16:03AM -0400, Frediano Ziglio wrote: > > Subject: [Spice-devel] [linux/vd-agent v1 5/7] coverity: allow pass by > > value with XEvent > > I would say that this patch is ignoring a warning, the code is > compiling. Hmm, I can rewrite shortlog but my feeling is that all

Re: [Spice-devel] [PATCH x11spice] Add cache for SHM segments

2019-07-15 Thread Frediano Ziglio
> > Add a cache to allow the reuse of SHM segments. > Shared memory segments are added to the cache instead of being > deallocated, and the cache is searched instead of/before allocating a > new segment. > > Both the SHM segments and their attachment with the X server are cached. > > The cache c

Re: [Spice-devel] [linux/vd-agent v1 3/7] covscan: check return value of fprintf

2019-07-15 Thread Victor Toso
Hi, On Mon, Jul 15, 2019 at 05:13:43AM -0400, Frediano Ziglio wrote: > > > > From: Victor Toso > > > > | Error: CHECKED_RETURN (CWE-252): > > | spice-vdagent-0.19.0/src/vdagentd/vdagentd.c:999: check_return: Calling > > | "fprintf" without checking return value (as is done elsewhere 29 out o

Re: [Spice-devel] [linux/vd-agent v1 7/7] vdagent: simple fix for address-of-packed-member

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > Seems to be a false positive but as this message only happens when user > client connects, we can copy this array to make compiling warn free. > > > src/vdagent/vdagent.c: In function ‘daemon_read_complete’: > > src/vdagent/vdagent.c:226:71: error: taking address of

Re: [Spice-devel] [linux/vd-agent v1 6/7] x11-randr: simplest fix for address-of-packed-member

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > The struct type for width/height is uint32_t while we are trying to > access and change it with int* - code can be improved a bit in following > patches but this one fixes the warning by copying the value from the > struct and copying back new value afterwards. > > Als

Re: [Spice-devel] [linux/vd-agent v1 5/7] coverity: allow pass by value with XEvent

2019-07-15 Thread Frediano Ziglio
> Subject: [Spice-devel] [linux/vd-agent v1 5/7] coverity: allow pass by value > with XEvent I would say that this patch is ignoring a warning, the code is compiling. > > From: Victor Toso > > Signed-off-by: Victor Toso > --- > src/vdagent/x11-randr.c | 4 ++-- > src/vdagent/x11.c | 1

Re: [Spice-devel] [linux/vd-agent v1 4/7] x11-randr: use glib's MAX and MIN

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > Since 2861868 "randr: remove monitors.xml on auto-configuration" in > 2015-04-10 by Marc-Andre Lureau this > file includes glib.h and can remove those helpers. > > Signed-off-by: Victor Toso > --- > src/vdagent/x11-randr.c | 18 -- > 1 file changed,

Re: [Spice-devel] [linux/vd-agent v1 3/7] covscan: check return value of fprintf

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > | Error: CHECKED_RETURN (CWE-252): > | spice-vdagent-0.19.0/src/vdagentd/vdagentd.c:999: check_return: Calling > | "fprintf" without checking return value (as is done elsewhere 29 out of > | 30 times). > | spice-vdagent-0.19.0/src/vdagentd/xorg-conf.c:95: example_a

Re: [Spice-devel] [linux/vd-agent v1 2/7] vdagent: fix memory leak of g_memdup()

2019-07-15 Thread Frediano Ziglio
> > From: Victor Toso > > Found by covscan: > > | spice-vdagent-0.19.0/src/vdagent/vdagent.c:432:9: warning: Potential leak > | of memory pointed to by 'orig_argv' > | #g_printerr("Invalid arguments, %s\n", error->message); > | #^ > | spice-vdagent-0.19.0/src/vdagent/vdagen

Re: [Spice-devel] [PATCH x11spice v2] Fix hang when launching with invalid config

2019-07-15 Thread Frediano Ziglio
> > When launching with no config file or arguments, the "You must provide > some authentication method" dialog appears. Clicking the Close button > would hang the application and it would never quit. > > s->draw_command_in_progress was uninitialized, and flush_and_lock() > would get stuck in an