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

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial