From df5870ad0004d3a2c23431783b243e7e3dc55900 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sun, 17 Sep 2017 07:35:45 -0500 Subject: Fix places where we assign state without using it. Sebastian points out that at various points we assign state only to overwrite it without using it later on. Harmless, but fixed here for neatness. Thanks. --- source/fitz/draw-device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/fitz/draw-device.c') diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 72498322..e001c3ea 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -515,7 +515,7 @@ fz_draw_clip_path(fz_context *ctx, fz_device *devp, const fz_path *path, int eve fz_irect *scissor_ptr = &state->scissor; if (dev->top == 0 && dev->resolve_spots) - state = push_group_for_separations(ctx, dev, fz_default_color_params(ctx)/* FIXME */, fz_proof_cs(ctx, dev), dev->default_cs); + (void)push_group_for_separations(ctx, dev, fz_default_color_params(ctx)/* FIXME */, fz_proof_cs(ctx, dev), dev->default_cs); if (flatness < 0.001f) flatness = 0.001f; @@ -586,7 +586,7 @@ fz_draw_clip_stroke_path(fz_context *ctx, fz_device *devp, const fz_path *path, fz_irect *scissor_ptr = &state->scissor; if (dev->top == 0 && dev->resolve_spots) - state = push_group_for_separations(ctx, dev, fz_default_color_params(ctx) /* FIXME */, fz_proof_cs(ctx, dev), dev->default_cs); + (void)push_group_for_separations(ctx, dev, fz_default_color_params(ctx) /* FIXME */, fz_proof_cs(ctx, dev), dev->default_cs); if (mlw > aa_level) aa_level = mlw; @@ -902,7 +902,7 @@ fz_draw_clip_text(fz_context *ctx, fz_device *devp, const fz_text *text, const f fz_rasterizer *rast = dev->rast; if (dev->top == 0 && dev->resolve_spots) - state = push_group_for_separations(ctx, dev, fz_default_color_params(ctx)/* FIXME */, fz_proof_cs(ctx, dev), dev->default_cs); + (void)push_group_for_separations(ctx, dev, fz_default_color_params(ctx)/* FIXME */, fz_proof_cs(ctx, dev), dev->default_cs); state = push_stack(ctx, dev); STACK_PUSHED("clip text"); @@ -1323,7 +1323,7 @@ fz_draw_fill_image(fz_context *ctx, fz_device *devp, fz_image *image, const fz_m int after; int dx, dy; fz_draw_state *state = &dev->stack[dev->top]; - fz_colorspace *model = state->dest->colorspace; + fz_colorspace *model; fz_irect clip; fz_matrix inverse; fz_irect src_area; @@ -1333,6 +1333,8 @@ fz_draw_fill_image(fz_context *ctx, fz_device *devp, fz_image *image, const fz_m if (dev->top == 0 && dev->resolve_spots) state = push_group_for_separations(ctx, dev, color_params, prf, dev->default_cs); + model = state->dest->colorspace; + fz_intersect_irect(fz_pixmap_bbox(ctx, state->dest, &clip), &state->scissor); if (image->w == 0 || image->h == 0) -- cgit v1.2.3