summaryrefslogtreecommitdiff
path: root/src/cairo-clip.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-03-18 16:57:04 +0100
committerAndrea Canciani <ranma42@gmail.com>2011-03-19 12:24:14 +0100
commitab8c108b88edf49959b95a8d7cc12edb239d361c (patch)
tree349c331a85c64610f7c60a9f55c100a8c64c0783 /src/cairo-clip.c
parent628ef17aca98ea3b0816a7dfa9e990275af6c791 (diff)
downloadcairo-ab8c108b88edf49959b95a8d7cc12edb239d361c.tar.gz
Do not warn when ignoring the return value of _cairo_rectangle_intersect()
gcc complains that cairo-surface-wrapper.c:647: warning: ignoring return value of ‘_cairo_rectangle_intersect’, declared with attribute warn_unused_result It can be silenced by making _cairo_rectangle_intersect() cairo_private_no_warn. This makes it possible to avoid unused temporary variables in other places and reduces the dead assignments reported by clang static analyzer from 114 to 98.
Diffstat (limited to 'src/cairo-clip.c')
-rw-r--r--src/cairo-clip.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index c76beee94..a695cd76c 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -368,7 +368,6 @@ _cairo_clip_path_reapply_clip_path_transform (cairo_clip_t *clip,
{
cairo_status_t status;
cairo_clip_path_t *clip_path;
- cairo_bool_t is_empty;
if (other_path->prev != NULL) {
status = _cairo_clip_path_reapply_clip_path_transform (clip,
@@ -394,8 +393,8 @@ _cairo_clip_path_reapply_clip_path_transform (cairo_clip_t *clip,
_cairo_path_fixed_approximate_clip_extents (&clip_path->path,
&clip_path->extents);
if (clip_path->prev != NULL) {
- is_empty = _cairo_rectangle_intersect (&clip_path->extents,
- &clip_path->prev->extents);
+ _cairo_rectangle_intersect (&clip_path->extents,
+ &clip_path->prev->extents);
}
clip_path->fill_rule = other_path->fill_rule;
@@ -1399,7 +1398,6 @@ intersect_with_boxes (cairo_composite_rectangles_t *extents,
{
cairo_rectangle_int_t rect;
cairo_box_t box;
- cairo_bool_t is_empty;
box.p1.x = box.p1.y = INT_MIN;
box.p2.x = box.p2.y = INT_MAX;
@@ -1416,8 +1414,8 @@ intersect_with_boxes (cairo_composite_rectangles_t *extents,
}
_cairo_box_round_to_rectangle (&box, &rect);
- is_empty = _cairo_rectangle_intersect (&extents->bounded, &rect);
- is_empty = _cairo_rectangle_intersect (&extents->unbounded, &rect);
+ _cairo_rectangle_intersect (&extents->bounded, &rect);
+ _cairo_rectangle_intersect (&extents->unbounded, &rect);
}
cairo_status_t