Fix build-breakage on Mac. Initial variable eventhough it is initialized in all reach...
authorfloitschV8@gmail.com <floitschV8@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 20 Sep 2010 10:58:41 +0000 (10:58 +0000)
committerfloitschV8@gmail.com <floitschV8@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 20 Sep 2010 10:58:41 +0000 (10:58 +0000)
Review URL: http://codereview.chromium.org/3471001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/fast-dtoa.cc

index eb78571..d2a00cc 100644 (file)
@@ -702,7 +702,7 @@ bool FastDtoa(double v,
   ASSERT(!Double(v).IsSpecial());
 
   bool result = false;
-  int decimal_exponent;
+  int decimal_exponent = 0;
   switch (mode) {
     case FAST_DTOA_SHORTEST:
       result = Grisu3(v, buffer, length, &decimal_exponent);
@@ -711,6 +711,8 @@ bool FastDtoa(double v,
       result = Grisu3Counted(v, requested_digits,
                              buffer, length, &decimal_exponent);
       break;
+    default:
+      UNREACHABLE();
   }
   if (result) {
     *decimal_point = *length + decimal_exponent;