diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2017-09-17 07:35:45 -0500 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-09-22 17:49:45 +0200 |
commit | df5870ad0004d3a2c23431783b243e7e3dc55900 (patch) | |
tree | 91108b14cf2fb4bfc78d2bff66abf48cb2a4fad5 | |
parent | c5bf8e3f8fbaff8d0f74640bd8b4515a5c0e03c3 (diff) | |
download | mupdf-df5870ad0004d3a2c23431783b243e7e3dc55900.tar.xz |
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.
-rw-r--r-- | source/fitz/draw-device.c | 10 |
1 files changed, 6 insertions, 4 deletions
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) |