Re: [Spice-devel] New thread: problems in porting glib2.0 and snappy onto android

2011-03-22 Thread Shuxiang Lim
Thanks for inspiring! Sorry for being unable to response instantly 'cause we're of diff. semisphere. The android-bluetooth module DOES have glib included, it uses only libglib, and now I've compiled it under android souce into libglib.so,but it's not usable to spice-gtk for it's glib-2.0-20

Re: [Spice-devel] [PATCH] tests: fix compilation with -Wall -Werror

2011-03-22 Thread Christophe Fergeau
On Mon, Mar 21, 2011 at 06:47:19PM +0100, Christophe Fergeau wrote: On Mon, Mar 21, 2011 at 05:24:54PM +0200, Alon Levy wrote: btw, while you're at it, mind trying to compile with clang? I ran some tests, spice compiled fine with clang using make CC=clang CXX=clang++ CFLAGS=-Wall

Re: [Spice-devel] [PATCH] server/tests: add test_playback

2011-03-22 Thread Uri Lublin
On 03/08/2011 10:03 PM, Alon Levy wrote: --- server/tests/Makefile.am |5 ++- server/tests/test_playback.c | 99 ++ server/tests/test_util.h |2 + 3 files changed, 105 insertions(+), 1 deletions(-) create mode 100644

[Spice-devel] [PATCH 0/2] Fix some clang static analyzer warnings

2011-03-22 Thread Christophe Fergeau
Hi, I ran spice through clang static analyzer (by doing scan-build ./autogen.sh scan-build make -e) and here are 2 patches fixing some minor issues it reported. Christophe Fergeau (2): common/pixman: remove dead assignments server/tests remove useless assignment common/pixman_utils.c

[Spice-devel] [PATCH 1/2] common/pixman: remove dead assignments

2011-03-22 Thread Christophe Fergeau
They were detected using clang-static-analyzer. Don't initialize the variable to a value to override it with a different value a few lines after. --- common/pixman_utils.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/common/pixman_utils.c

[Spice-devel] [PATCH 2/2] server/tests remove useless assignment

2011-03-22 Thread Christophe Fergeau
This was detected by clang-static-analyzer. --- server/tests/basic_event_loop.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/server/tests/basic_event_loop.c b/server/tests/basic_event_loop.c index 2fe1b69..8db4426 100644 --- a/server/tests/basic_event_loop.c +++

[Spice-devel] [spice-gtk 0/3] fix various warnings reported by clang static analyzer

2011-03-22 Thread Christophe Fergeau
I ran clang static analyzer on gtk-spice using scan-build ./autogen.sh scan-build make -e and it reported some errors (unused variables and potential NULL dereferences). This patch series fixes these warnings. Christophe Fergeau (3): gtk: remove unused variables gtk: don't attempt to

[Spice-devel] [spice-gtk 1/3] gtk: remove unused variables

2011-03-22 Thread Christophe Fergeau
They were spotted by the clang static analyzer. --- gtk/channel-record.c | 10 -- gtk/spice-channel.c |3 +-- 2 files changed, 1 insertions(+), 12 deletions(-) diff --git a/gtk/channel-record.c b/gtk/channel-record.c index c7f7054..69c9ea0 100644 --- a/gtk/channel-record.c +++

[Spice-devel] [spice-gtk 2/3] gtk: don't attempt to dereference NULL pointer

2011-03-22 Thread Christophe Fergeau
In spice_channel_handle_migrate there's an explicit check for data being NULL. However, we subsequently dereference it twice even when it can be NULL. Add explicit checks to avoid that. --- gtk/channel-base.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git

[Spice-devel] [spice-gtk 3/3] gtk/display: be more paranoid about potentially NULL pointer

2011-03-22 Thread Christophe Fergeau
If things don't go as expected in gnome_rr_config_ensure_primary (for example we don't find any usable output), we may end up trying to dereference a NULL pointer. It's better to check top_left is not NULL before using it. --- gtk/display/gnome-rr-config.c |2 +- 1 files changed, 1

[Spice-devel] [PATCH] opengl: fix compilation

2011-03-22 Thread Christophe Fergeau
When OpenGL is enabled, build fails in DisplayChannel::create_surface because Canvas *canvas is declared twice. Remove the first declaration to fix compilation. --- client/display_channel.cpp |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/client/display_channel.cpp

Re: [Spice-devel] [PATCH] opengl: fix compilation

2011-03-22 Thread Hans de Goede
Ack. On 03/22/2011 04:16 PM, Christophe Fergeau wrote: When OpenGL is enabled, build fails in DisplayChannel::create_surface because Canvas *canvas is declared twice. Remove the first declaration to fix compilation. --- client/display_channel.cpp |3 --- 1 files changed, 0 insertions(+),

[Spice-devel] [PATCH] common/gl: remove unused variable

2011-03-22 Thread Christophe Fergeau
clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have to call it, but we don't need to save its return value since it's not used. --- common/glc.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

Re: [Spice-devel] [PATCH] common/gl: remove unused variable

2011-03-22 Thread Christophe Fergeau
hrm, forget about that patch, I forgot to remove the len declaration, this breaks compilation. Christophe 2011/3/22 Christophe Fergeau cferg...@gmail.com: clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have to

[Spice-devel] [PATCH] common/gl: remove unused variable

2011-03-22 Thread Christophe Fergeau
clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have to call it, but we don't need to save its return value since it's not used. --- common/glc.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff

Re: [Spice-devel] [PATCH] common/gl: remove unused variable

2011-03-22 Thread Hans de Goede
Ack. On 03/22/2011 05:22 PM, Christophe Fergeau wrote: clang static analyzer warned that 'len' was computed but never used in glc_vertex2d. glc_stroke_line_dash has side effects so we have to call it, but we don't need to save its return value since it's not used. --- common/glc.c |5