Skip to content

Commit

Permalink
mi: Correct a miscall of abs() to instead call fabs()
Browse files Browse the repository at this point in the history
miarc.c:1714:9: warning: using integer absolute value function
'abs' when
      argument is of floating point type [-Wabsolute-value,Semantic Issue]
    if (abs(parc->angle2) >= 360.0)
        ^
miarc.c:1714:9: note: use function 'fabs' instead [Semantic Issue]
    if (abs(parc->angle2) >= 360.0)
        ^~~
        fabs

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
  • Loading branch information
jeremyhu authored and nwnk committed Oct 19, 2015
1 parent 4513f92 commit 610dd8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mi/miarc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,7 @@ miGetArcPts(SppArcPtr parc, /* points to an arc */
y1 = y2;
}
/* adjust the last point */
if (abs(parc->angle2) >= 360.0)
if (fabs(parc->angle2) >= 360.0)
poly[cpt + i - 1] = poly[0];
else {
poly[cpt + i - 1].x = (miDcos(st + et) * parc->width / 2.0 + xc);
Expand Down

0 comments on commit 610dd8a

Please sign in to comment.