From 477a54bc9ed8f252b3a42af8ac01ef1da7b5ab6b Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Thu, 7 Jul 2011 14:47:51 +0800 Subject: [PATCH] glamor: Fixed two unintialized warnings. Signed-off-by: Zhigang Gong --- glamor/glamor_copyarea.c | 7 ++++++- glamor/glamor_polylines.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/glamor/glamor_copyarea.c b/glamor/glamor_copyarea.c index 2408e3aae..9e2be123e 100644 --- a/glamor/glamor_copyarea.c +++ b/glamor/glamor_copyarea.c @@ -309,7 +309,7 @@ glamor_copy_n_to_n(DrawablePtr src, void *closure) { glamor_access_t dst_access; - PixmapPtr dst_pixmap, src_pixmap, temp_pixmap; + PixmapPtr dst_pixmap, src_pixmap, temp_pixmap = NULL; DrawablePtr temp_src = src; glamor_pixmap_private *dst_pixmap_priv, *src_pixmap_priv; BoxRec bound; @@ -361,6 +361,11 @@ glamor_copy_n_to_n(DrawablePtr src, temp_dy = -bound.y1; temp_src = &temp_pixmap->drawable; } + else { + temp_dx = dx; + temp_dy = dy; + temp_src = src; + } if (glamor_copy_n_to_n_textured(temp_src, dst, gc, box, nbox, temp_dx, temp_dy)) { goto done; diff --git a/glamor/glamor_polylines.c b/glamor/glamor_polylines.c index 3fdb26426..d93b60209 100644 --- a/glamor/glamor_polylines.c +++ b/glamor/glamor_polylines.c @@ -55,7 +55,7 @@ glamor_poly_lines(DrawablePtr drawable, GCPtr gc, int mode, int n, int y_max = MINSHORT; DrawablePtr temp_dest; PixmapPtr temp_pixmap; - GCPtr temp_gc; + GCPtr temp_gc = NULL; /* Don't try to do wide lines or non-solid fill style. */ if (gc->lineWidth != 0) { /* This ends up in miSetSpans, which is accelerated as well as we