Bug 984073 - Fix warning in double-conversion and suppress warnings in lz4. r=Waldo

This commit is contained in:
Chris Peterson 2014-03-15 23:23:28 -07:00
parent bf837a1875
commit b60823d409
4 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,24 @@
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);
}

View File

@ -506,7 +506,9 @@ float Strtof(Vector<const char> buffer, int exponent) {
double double_previous = Double(double_guess).PreviousDouble(); double double_previous = Double(double_guess).PreviousDouble();
float f1 = static_cast<float>(double_previous); float f1 = static_cast<float>(double_previous);
#if defined(DEBUG)
float f2 = float_guess; float f2 = float_guess;
#endif
float f3 = static_cast<float>(double_next); float f3 = static_cast<float>(double_next);
float f4; float f4;
if (is_correct) { if (is_correct) {

View File

@ -21,6 +21,7 @@ patch -p3 < use-StandardInteger.patch
patch -p3 < use-mozilla-assertions.patch patch -p3 < use-mozilla-assertions.patch
patch -p3 < use-static_assert.patch patch -p3 < use-static_assert.patch
patch -p3 < ToPrecision-exponential.patch patch -p3 < ToPrecision-exponential.patch
patch -p3 < fix-gcc-warnings.patch
# Merged upstream, part of 2.0.1 version # Merged upstream, part of 2.0.1 version
patch -p3 < fix-aarch64-macro.patch patch -p3 < fix-aarch64-macro.patch

View File

@ -93,3 +93,8 @@ SOURCES += [
] ]
DISABLE_STL_WRAPPING = True DISABLE_STL_WRAPPING = True
# Suppress warnings in third-party code.
if CONFIG['GNU_CXX']:
# TODO: Remove this LZ4 warning suppression after bug 993267 is fixed.
SOURCES['Compression.cpp'].flags += ['-Wno-unused-function']