summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2013-09-27 15:37:08 +0200
committerUli Schlachter <psychon@znc.in>2013-09-27 15:42:24 +0200
commit0c2faf6621c4983e2ec2bea7c722a5cd3d89cc6d (patch)
treedf1855935827c698d6082fa224449a44ffe0c01b
parent38a925460b35c82833dc4d508e7a0e7e84242318 (diff)
fill_reduces_to_source(): Handle failure of color_to_pixel()
The function color_to_pixel() can fail for unsupported pixman image formats, but fill_reduces_to_source() ignored this possibility. Fix this by using the return value of color_to_pixel(): Fixes the following compiler warnings: cairo-image-compositor.c: In function 'fill_boxes': cairo-image-compositor.c:349:15: warning: 'pixel' may be used uninitialized in this function [-Wmaybe-uninitialized] cairo-image-compositor.c: In function 'fill_rectangles': cairo-image-compositor.c:304:18: warning: 'pixel' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Uli Schlachter <psychon@znc.in>
-rw-r--r--src/cairo-image-compositor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
index d0c4dd9..0f47814 100644
--- a/src/cairo-image-compositor.c
+++ b/src/cairo-image-compositor.c
@@ -279,8 +279,7 @@ fill_reduces_to_source (cairo_operator_t op,
uint32_t *pixel)
{
if (__fill_reduces_to_source (op, color, dst)) {
- color_to_pixel (color, dst->pixman_format, pixel);
- return TRUE;
+ return color_to_pixel (color, dst->pixman_format, pixel);
}
return FALSE;