[cairo-bugs] [Bug 104136] New: _cairo_clip_reduce_to_boxes appears to have a merge bug; it returns early
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Dec 5 19:02:08 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=104136
Bug ID: 104136
Summary: _cairo_clip_reduce_to_boxes appears to have a merge
bug; it returns early
Product: cairo
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: chris at chris-wilson.co.uk
Reporter: arlied at google.com
QA Contact: cairo-bugs at cairographics.org
While reading code, I noticed that the function _cairo_clip_reduce_to_boxes
appears to have an extra "return clip;" in it. This is the first
(non-declaration) statement in the function, and so the function does nothing
at all except for return the value of its input argument "clip". The code:
static cairo_clip_t *
_cairo_clip_reduce_to_boxes (cairo_clip_t *clip)
{
struct reduce r;
cairo_clip_path_t *clip_path;
cairo_status_t status;
return clip; // <-- THIS LOOKS BOGUS
if (clip->path == NULL)
return clip;
r.clip = clip;
r.extents.p1.x = r.extents.p1.y = INT_MAX;
r.extents.p2.x = r.extents.p2.y = INT_MIN;
I checked the Git history, and this bug has been there from the first commit
which added this file.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20171205/7abeaee4/attachment.html>
More information about the cairo-bugs
mailing list