Bug 91639 - test/path-precision.c: path_data_t union point members initialized as headers
Summary: test/path-precision.c: path_data_t union point members initialized as headers
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-14 15:27 UTC by Massimo
Modified: 2018-08-25 13:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Massimo 2015-08-14 15:27:03 UTC
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.
Comment 1 GitLab Migration User 2018-08-25 13:40:04 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/126.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.