[cairo-commit] src/cairo-surface.c src/cairo-svg-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Sep 29 08:40:49 PDT 2008


 src/cairo-surface.c     |    8 ++++++--
 src/cairo-svg-surface.c |    1 -
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit d703f964aa7d1d4c8ec0b8a5dee437c222ce8629
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Sep 29 16:37:35 2008 +0100

    Clean up compile warnings.
    
    A couple of unchecked status returns (which should always be
    CAIRO_STATUS_SUCCESS) and an unused variable.

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index ea51d2f..24db00a 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -812,7 +812,9 @@ _cairo_surface_set_device_scale (cairo_surface_t *surface,
     surface->device_transform.yx = 0.0;
 
     surface->device_transform_inverse = surface->device_transform;
-    cairo_matrix_invert (&surface->device_transform_inverse);
+    status = cairo_matrix_invert (&surface->device_transform_inverse);
+    /* should always be invertible unless given pathological input */
+    assert (status == CAIRO_STATUS_SUCCESS);
 }
 
 /**
@@ -854,7 +856,9 @@ cairo_surface_set_device_offset (cairo_surface_t *surface,
     surface->device_transform.y0 = y_offset;
 
     surface->device_transform_inverse = surface->device_transform;
-    cairo_matrix_invert (&surface->device_transform_inverse);
+    status = cairo_matrix_invert (&surface->device_transform_inverse);
+    /* should always be invertible unless given pathological input */
+    assert (status == CAIRO_STATUS_SUCCESS);
 }
 slim_hidden_def (cairo_surface_set_device_offset);
 
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index ecb7163..8095aa4 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -1033,7 +1033,6 @@ _cairo_svg_surface_emit_composite_image_pattern (cairo_output_stream_t   *output
 						 const cairo_matrix_t	 *parent_matrix,
 						 const char		 *extra_attributes)
 {
-    cairo_surface_attributes_t surface_attr;
     cairo_rectangle_int_t extents;
     cairo_status_t status;
     cairo_matrix_t p2u;


More information about the cairo-commit mailing list