Fix an uninitialized value warning in APFloat.
authorErick Tryzelaar <idadesub@users.sourceforge.net>
Tue, 18 Aug 2009 18:20:37 +0000 (18:20 +0000)
committerErick Tryzelaar <idadesub@users.sourceforge.net>
Tue, 18 Aug 2009 18:20:37 +0000 (18:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79353 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APFloat.cpp

index d8d492c..d15a21b 100644 (file)
@@ -2132,7 +2132,7 @@ APFloat::opStatus
 APFloat::convertFromHexadecimalString(const StringRef &s,
                                       roundingMode rounding_mode)
 {
-  lostFraction lost_fraction;
+  lostFraction lost_fraction = lfExactlyZero;
   integerPart *significand;
   unsigned int bitPos, partsCount;
   StringRef::iterator dot, firstSignificantDigit;
@@ -2159,7 +2159,6 @@ APFloat::convertFromHexadecimalString(const StringRef &s,
 
     hex_value = hexDigitValue(*p);
     if(hex_value == -1U) {
-      lost_fraction = lfExactlyZero;
       break;
     }