Fixed compiler warnings after uClibc code update
authorSam Lantinga <slouken@libsdl.org>
Sat, 04 Nov 2017 17:39:28 -0700
changeset 116851788f503254d
parent 11684 eccdf37f8996
child 11686 3893a60fc5a9
Fixed compiler warnings after uClibc code update
src/libm/e_atan2.c
src/libm/e_fmod.c
src/libm/s_floor.c
     1.1 --- a/src/libm/e_atan2.c	Sat Nov 04 17:35:03 2017 -0700
     1.2 +++ b/src/libm/e_atan2.c	Sat Nov 04 17:39:28 2017 -0700
     1.3 @@ -57,8 +57,8 @@
     1.4  	ix = hx&0x7fffffff;
     1.5  	EXTRACT_WORDS(hy,ly,y);
     1.6  	iy = hy&0x7fffffff;
     1.7 -	if(((ix|((lx|-lx)>>31))>0x7ff00000)||
     1.8 -	   ((iy|((ly|-ly)>>31))>0x7ff00000))	/* x or y is NaN */
     1.9 +	if(((ix|((lx|-(int32_t)lx)>>31))>0x7ff00000)||
    1.10 +	   ((iy|((ly|-(int32_t)ly)>>31))>0x7ff00000))	/* x or y is NaN */
    1.11  	   return x+y;
    1.12  	if(((hx-0x3ff00000)|lx)==0) return atan(y);   /* x=1.0 */
    1.13  	m = ((hy>>31)&1)|((hx>>30)&2);	/* 2*sign(x)+sign(y) */
     2.1 --- a/src/libm/e_fmod.c	Sat Nov 04 17:35:03 2017 -0700
     2.2 +++ b/src/libm/e_fmod.c	Sat Nov 04 17:39:28 2017 -0700
     2.3 @@ -33,7 +33,7 @@
     2.4  
     2.5      /* purge off exception values */
     2.6  	if((hy|ly)==0||(hx>=0x7ff00000)||	/* y=0,or x not finite */
     2.7 -	  ((hy|((ly|-ly)>>31))>0x7ff00000))	/* or y is NaN */
     2.8 +	  ((hy|((ly|-(int32_t)ly)>>31))>0x7ff00000))	/* or y is NaN */
     2.9  	    return (x*y)/(x*y);
    2.10  	if(hx<=hy) {
    2.11  	    if((hx<hy)||(lx<ly)) return x;	/* |x|<|y| return x */
     3.1 --- a/src/libm/s_floor.c	Sat Nov 04 17:35:03 2017 -0700
     3.2 +++ b/src/libm/s_floor.c	Sat Nov 04 17:39:28 2017 -0700
     3.3 @@ -58,7 +58,7 @@
     3.4  		    if(j0==20) i0+=1;
     3.5  		    else {
     3.6  			j = i1+(1<<(52-j0));
     3.7 -			if(j<i1) i0 +=1 ; 	/* got a carry */
     3.8 +			if(j<(u_int32_t)i1) i0 +=1 ; 	/* got a carry */
     3.9  			i1=j;
    3.10  		    }
    3.11  		}