From 3c9e5d9792e101cfbd5a1116f06579539ed7b585 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 26 Apr 2010 18:13:36 +0100 Subject: [PATCH] region: Cast to remove const to suppress compiler warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit airo-region.c: In function ‘cairo_region_intersect’: cairo-region.c:503: warning: passing argument 3 of ‘pixman_region32_intersect’ discards qualifiers from pointer target type /usr/local/include/pixman-1/pixman.h:518: note: expected ‘struct pixman_region32_t *’ but argument is of type ‘const struct pixman_region32_t *’ cairo-region.c: In function ‘cairo_region_union’: cairo-region.c:566: warning: passing argument 3 of ‘pixman_region32_union’ discards qualifiers from pointer target type /usr/local/include/pixman-1/pixman.h:521: note: expected ‘struct pixman_region32_t *’ but argument is of type ‘const struct pixman_region32_t *’ --- src/cairo-region.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-region.c b/src/cairo-region.c index d423bd0e9..e4e9b7eac 100644 --- a/src/cairo-region.c +++ b/src/cairo-region.c @@ -500,7 +500,7 @@ cairo_region_intersect (cairo_region_t *dst, const cairo_region_t *other) if (other->status) return _cairo_region_set_error (dst, other->status); - if (! pixman_region32_intersect (&dst->rgn, &dst->rgn, &other->rgn)) + if (! pixman_region32_intersect (&dst->rgn, &dst->rgn, CONST_CAST &other->rgn)) return _cairo_region_set_error (dst, CAIRO_STATUS_NO_MEMORY); return CAIRO_STATUS_SUCCESS; @@ -563,7 +563,7 @@ cairo_region_union (cairo_region_t *dst, if (other->status) return _cairo_region_set_error (dst, other->status); - if (! pixman_region32_union (&dst->rgn, &dst->rgn, &other->rgn)) + if (! pixman_region32_union (&dst->rgn, &dst->rgn, CONST_CAST &other->rgn)) return _cairo_region_set_error (dst, CAIRO_STATUS_NO_MEMORY); return CAIRO_STATUS_SUCCESS;