[PATCH xquartz 01/10] mi: Correct a miscall of abs() to instead call fabs()

2015-10-14 Thread Jeremy Huddleston Sequoia
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 
---
 mi/miarc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mi/miarc.c b/mi/miarc.c
index 5e854b3..2588ee4 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -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);
-- 
2.6.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xquartz 01/10] mi: Correct a miscall of abs() to instead call fabs()

2015-10-14 Thread Alan Coopersmith

On 10/14/15 03:13 PM, Jeremy Huddleston Sequoia wrote:

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 
---
  mi/miarc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mi/miarc.c b/mi/miarc.c
index 5e854b3..2588ee4 100644
--- a/mi/miarc.c
+++ b/mi/miarc.c
@@ -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);



Reviewed-by: Alan Coopersmith 

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel