<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - test/subsurface.c: cairo_select_font_face invoked with 2 arguments swapped"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91635">91635</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>test/subsurface.c: cairo_select_font_face invoked with 2 arguments swapped
</td>
</tr>
<tr>
<th>Product</th>
<td>cairo
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>trivial
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Assignee</th>
<td>chris@chris-wilson.co.uk
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sixtysix@inwind.it
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>cairo-bugs@cairographics.org
</td>
</tr></table>
<p>
<div>
<pre>When building cairo with 'clang' there is an interesting warning
<span class="quote">>subsurface.c:51:5: warning: implicit conversion from enumeration type 'enum _cairo_font_weight' to different enumeration type 'cairo_font_slant_t' (aka 'enum _cairo_font
> CAIRO_FONT_WEIGHT_NORMAL,
> ^~~~~~~~~~~~~~~~~~~~~~~~
>subsurface.c:52:5: warning: implicit conversion from enumeration type 'enum _cairo_font_slant' to different enumeration type 'cairo_font_weight_t' (aka 'enum _cairo_font
> CAIRO_FONT_SLANT_NORMAL);
> ^~~~~~~~~~~~~~~~~~~~~~~</span >
In fact cairo_select_font_face is declared as:
<a href="http://cgit.freedesktop.org/cairo/tree/src/cairo.h#n1416">http://cgit.freedesktop.org/cairo/tree/src/cairo.h#n1416</a>
and accepts a cairo_font_slant_t followed by a cairo_font_weight_t,
but in test/subsurface.c (and test/subsurface-scale.c):
<a href="http://cgit.freedesktop.org/cairo/tree/test/subsurface.c#n49">http://cgit.freedesktop.org/cairo/tree/test/subsurface.c#n49</a>
CAIRO_FONT_SLANT_NORMAL follows CAIRO_FONT_WEIGHT_NORMAL. Given that
these tests are often used as examples or to generate more elaborate
tests I suggest to swap the arguments even if the two values are the
same (in both test files).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>