[cairo-bugs] [Bug 91639] New: test/path-precision.c: path_data_t union point members initialized as headers

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Aug 14 08:27:03 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=91639

            Bug ID: 91639
           Summary: test/path-precision.c: path_data_t union point members
                    initialized as headers
           Product: cairo
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: chris at chris-wilson.co.uk
          Reporter: sixtysix at inwind.it
        QA Contact: cairo-bugs at cairographics.org

Building cairo with 'clang' there is an interesting warning:

>path-precision.c:43:17: warning: implicit conversion from 'double' to 'int' changes value from 41.25581 to 41 [-Wliteral-conversion]
> { { 94.960533, 41.255810 }, },
>   ~            ^~~~~~~~~
>path-precision.c:46:17: warning: implicit conversion from 'double' to 'int' changes value from 42.50666 to 42 [-Wliteral-conversion]
> { { 94.842293, 42.50666 }, },
>   ~            ^~~~~~~~
>path-precision.c:49:17: warning: implicit conversion from 'double' to 'int' changes value from 43.747627 to 43 [-Wliteral-conversion]
> { { 94.645744, 43.747627 }, },
>   ~            ^~~~~~~~~
>path-precision.c:52:17: warning: implicit conversion from 'double' to 'int' changes value from 44.973797 to 44 [-Wliteral-conversion]
> { { 94.371666, 44.973797 }, },
>   ~            ^~~~~~~~~
>4 warnings generated.


Adding a '.point = ' between the two open braces in the lines specified
in clang output and at line 40 makes the test log change from:

>Testing path-precision with image target (dev offset 0 scale: 1)
>Paths differ in coordinates after 0 operations.
>Expected point (0.000000, 0.000000), found (0.000000, 0.000000).
>Error: Function under test failed
>TEST: path-precision TARGET: image FORMAT: rgb24 OFFSET: 0 SCALE: 1 SIMILAR: 0 RESULT: XFAIL

to:

>Testing path-precision with image target (dev offset 0 scale: 1)
>Paths differ in coordinates after 1 operations.
>Expected point (94.960533, 41.255810), found (94.960938, 41.253906).
>Error: Function under test failed
>TEST: path-precision TARGET: image FORMAT: rgb24 OFFSET: 0 SCALE: 1 SIMILAR: 0 RESULT: XFAIL

which seems to be a little more similar to the input and to the 
expectations.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150814/8363b17d/attachment.html>


More information about the cairo-bugs mailing list