[Spice-commits] common/canvas_base.c common/sw_canvas.c
Daniel P. Berrange
berrange at kemper.freedesktop.org
Wed Apr 25 06:24:01 PDT 2012
common/canvas_base.c | 4 +++-
common/sw_canvas.c | 6 +++---
2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit ff25524948c96a86538d23a98b3fcb1bbc85cf31
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Wed Apr 25 10:52:01 2012 +0100
Add missing struct field initializers
Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
diff --git a/common/canvas_base.c b/common/canvas_base.c
index 8f5b0c8..4f40306 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -2988,7 +2988,7 @@ static void canvas_draw_stroke(SpiceCanvas *spice_canvas, SpiceRect *bbox,
{
CanvasBase *canvas = (CanvasBase *)spice_canvas;
SpiceCanvas *surface_canvas = NULL;
- StrokeGC gc = { { 0 } };
+ StrokeGC gc;
lineGCOps ops = {
stroke_fill_spans,
stroke_fill_rects
@@ -2997,6 +2997,8 @@ static void canvas_draw_stroke(SpiceCanvas *spice_canvas, SpiceRect *bbox,
unsigned int i;
int dashed;
+ memset(&gc, 0, sizeof(gc));
+
pixman_region32_init_rect(&gc.dest_region,
bbox->left, bbox->top,
bbox->right - bbox->left,
diff --git a/common/sw_canvas.c b/common/sw_canvas.c
index 2c1782b..4b10383 100644
--- a/common/sw_canvas.c
+++ b/common/sw_canvas.c
@@ -659,7 +659,7 @@ static void __blend_image(SpiceCanvas *spice_canvas,
mask = NULL;
if (overall_alpha != 0xff) {
- pixman_color_t color = { 0 };
+ pixman_color_t color = { 0, 0, 0, 0 };
color.alpha = overall_alpha * 0x101;
mask = pixman_image_create_solid_fill(&color);
}
@@ -752,7 +752,7 @@ static void __blend_scale_image(SpiceCanvas *spice_canvas,
mask = NULL;
if (overall_alpha != 0xff) {
- pixman_color_t color = { 0 };
+ pixman_color_t color = { 0, 0, 0, 0 };
color.alpha = overall_alpha * 0x101;
mask = pixman_image_create_solid_fill(&color);
}
@@ -1044,7 +1044,7 @@ static void canvas_draw_text(SpiceCanvas *spice_canvas, SpiceRect *bbox,
pixman_region32_t dest_region;
pixman_image_t *str_mask, *brush;
SpiceString *str;
- SpicePoint pos = { 0, };
+ SpicePoint pos = { 0, 0 };
int depth;
pixman_region32_init_rect(&dest_region,
More information about the Spice-commits
mailing list