mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-04 21:20:38 +02:00
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>
This commit is contained in:
parent
549129e306
commit
c553424a1d
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue