Skip to content

Commit

Permalink
region: Cast to remove const to suppress compiler warnings.
Browse files Browse the repository at this point in the history
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 *’
  • Loading branch information
Chris Wilson committed Apr 26, 2010
1 parent 8c72122 commit 3c9e5d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cairo-region.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3c9e5d9

Please sign in to comment.