summaryrefslogtreecommitdiff
path: root/src/cairo-bentley-ottmann-rectangular.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2017-10-21 13:02:42 +1030
committerAdrian Johnson <ajohnson@redneon.com>2017-10-21 13:08:30 +1030
commitb092b63119cbfe3cb4bc786eee81630998996acf (patch)
tree8b7748bfd00e86930e5a15777f0ea8bdc834ddf4 /src/cairo-bentley-ottmann-rectangular.c
parent132794f6832ea83e2f9a72e11b05080d2cdf80f8 (diff)
downloadcairo-b092b63119cbfe3cb4bc786eee81630998996acf.tar.gz
fix warning: variable X might be clobbered by 'longjmp'
Move calls to setjmp into separate function to avoid clobbering local variables.
Diffstat (limited to 'src/cairo-bentley-ottmann-rectangular.c')
-rw-r--r--src/cairo-bentley-ottmann-rectangular.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cairo-bentley-ottmann-rectangular.c b/src/cairo-bentley-ottmann-rectangular.c
index 29f902c1a..15688c744 100644
--- a/src/cairo-bentley-ottmann-rectangular.c
+++ b/src/cairo-bentley-ottmann-rectangular.c
@@ -593,6 +593,12 @@ sweep_line_insert (sweep_line_t *sweep, rectangle_t *rectangle)
pqueue_push (sweep, rectangle);
}
+static int
+sweep_line_setjmp (sweep_line_t *sweep_line)
+{
+ return setjmp (sweep_line->unwind);
+}
+
static cairo_status_t
_cairo_bentley_ottmann_tessellate_rectangular (rectangle_t **rectangles,
int num_rectangles,
@@ -609,7 +615,7 @@ _cairo_bentley_ottmann_tessellate_rectangular (rectangle_t **rectangles,
rectangles, num_rectangles,
fill_rule,
do_traps, container);
- if ((status = setjmp (sweep_line.unwind)))
+ if ((status = sweep_line_setjmp (&sweep_line)))
return status;
rectangle = rectangle_pop_start (&sweep_line);