[Spice-devel] [PATCH] fix two warnings

Gerd Hoffmann kraxel at redhat.com
Mon Apr 26 04:47:15 PDT 2010


---
 client/x11/platform.cpp |    2 +-
 common/canvas_base.c    |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
index 498e6e5..550de19 100644
--- a/client/x11/platform.cpp
+++ b/client/x11/platform.cpp
@@ -260,7 +260,7 @@ XImage *XPlatform::create_x_image(RedDrawable::Format format,
                                   Visual *visual,
                                   XShmSegmentInfo **shminfo_out)
 {
-    XImage *image;
+    XImage *image = NULL;
     uint8_t *data;
     size_t stride;
 
diff --git a/common/canvas_base.c b/common/canvas_base.c
index c305f4d..add43eb 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -2164,6 +2164,8 @@ static void canvas_draw_transparent(SpiceCanvas *spice_canvas, SpiceRect *bbox,
     case SPICE_SURFACE_FMT_16_565:
         transparent_color = rgb_32_to_16_565(transparent->true_color);
         break;
+    default:
+        transparent_color = 0;
     }
 
     surface_canvas = canvas_get_surface(canvas, transparent->src_bitmap);
-- 
1.6.6.1



More information about the Spice-devel mailing list