Possibly uninitialized variable. From Clang via dhill.
authormiod <miod@openbsd.org>
Thu, 22 Jan 2015 21:17:43 +0000 (21:17 +0000)
committermiod <miod@openbsd.org>
Thu, 22 Jan 2015 21:17:43 +0000 (21:17 +0000)
lib/libm/src/e_expf.c

index 0e0bc54..67e8fc4 100644 (file)
@@ -45,6 +45,7 @@ expf(float x) /* default IEEE double exp */
        GET_FLOAT_WORD(hx,x);
        xsb = (hx>>31)&1;               /* sign bit of x */
        hx &= 0x7fffffff;               /* high word of |x| */
+       k = 0;
 
     /* filter out non-finite argument */
        if(hx >= 0x42b17218) {                  /* if |x|>=88.721... */
@@ -71,7 +72,6 @@ expf(float x) /* default IEEE double exp */
        else if(hx < 0x31800000)  {     /* when |x|<2**-28 */
            if(huge+x>one) return one+x;/* trigger inexact */
        }
-       else k = 0;
 
     /* x is now in primary range */
        t  = x*x;