X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Ftest%2FStringTest.cpp;h=63f9491ebe81cb2956cc2fa2c14555b9ff216817;hb=1c60d7571403a19794be9912a7b4247e89cefe1a;hp=3c5ecf314709b69f9f38873d142fbdb72a09f6d7;hpb=dca00970158ede9bcbbea9dea9bc0b6014be1191;p=folly.git diff --git a/folly/test/StringTest.cpp b/folly/test/StringTest.cpp index 3c5ecf31..63f9491e 100644 --- a/folly/test/StringTest.cpp +++ b/folly/test/StringTest.cpp @@ -532,7 +532,7 @@ TEST(PrettyToDouble, Basic) { PrettyType formatType = testCase.prettyType; double x = testCase.realValue; std::string testString = testCase.prettyString; - double recoveredX; + double recoveredX = 0; try{ recoveredX = prettyToDouble(testString, formatType); } catch (std::range_error &ex){ @@ -549,7 +549,7 @@ TEST(PrettyToDouble, Basic) { for (double x = 1e-18; x < 1e40; x *= 1.9){ bool addSpace = static_cast (i) == PRETTY_SI; for (int it = 0; it < 2; ++it, addSpace = true){ - double recoveredX; + double recoveredX = 0; try{ recoveredX = prettyToDouble(prettyPrint(x, formatType, addSpace), formatType); @@ -1009,7 +1009,7 @@ TEST(Split, std_string_fixed) { TEST(Split, fixed_convert) { StringPiece a, d; int b; - double c; + double c = 0; EXPECT_TRUE(folly::split(':', "a:13:14.7:b", a, b, c, d)); EXPECT_EQ("a", a);