gecko-dev/mfbt/double-conversion/fix-gcc-warnings.patch

25 lines
915 B
Diff

diff --git a/a/mfbt/double-conversion/strtod.cc b/inbound/mfbt/double-conversion/strtod.cc
index 9758989..97fa4a5 100644
--- a/a/mfbt/double-conversion/strtod.cc
+++ b/inbound/mfbt/double-conversion/strtod.cc
@@ -501,17 +501,19 @@ float Strtof(Vector<const char> buffer, int exponent) {
// if they would round to the same float. If the guess is not correct we have
// to look at four values (since two different doubles could be the correct
// double).
double double_next = Double(double_guess).NextDouble();
double double_previous = Double(double_guess).PreviousDouble();
float f1 = static_cast<float>(double_previous);
+#if defined(DEBUG)
float f2 = float_guess;
+#endif
float f3 = static_cast<float>(double_next);
float f4;
if (is_correct) {
f4 = f3;
} else {
double double_next2 = Double(double_next).NextDouble();
f4 = static_cast<float>(double_next2);
}