diff --git a/src/3rdparty/double-conversion/patches/0001-Fix-unused-parameter-compiler-warning-on-32-bit-Linux.patch b/src/3rdparty/double-conversion/patches/0001-Fix-unused-parameter-compiler-warning-on-32-bit-Linux.patch new file mode 100644 index 00000000000..ad986f10e1f --- /dev/null +++ b/src/3rdparty/double-conversion/patches/0001-Fix-unused-parameter-compiler-warning-on-32-bit-Linux.patch @@ -0,0 +1,17 @@ +diff --git a/src/3rdparty/double-conversion/strtod.cc b/src/3rdparty/double-conversion/strtod.cc +index e8cc13f2de..1b9f0f5b74 100644 +--- a/src/3rdparty/double-conversion/strtod.cc ++++ b/src/3rdparty/double-conversion/strtod.cc +@@ -198,6 +198,12 @@ static bool DoubleStrtod(Vector trimmed, + int exponent, + double* result) { + #if !defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS) ++ // NB: Qt uses -Werror=unused-parameter which results in compiler error here ++ // in this branch. Using "(void)x" idiom to prevent the error. ++ (void)trimmed; ++ (void)exponent; ++ (void)result; ++ + // On x86 the floating-point stack can be 64 or 80 bits wide. If it is + // 80 bits wide (as is the case on Linux) then double-rounding occurs and the + // result is not accurate. diff --git a/src/3rdparty/double-conversion/strtod.cc b/src/3rdparty/double-conversion/strtod.cc index e8cc13f2de9..1b9f0f5b74c 100644 --- a/src/3rdparty/double-conversion/strtod.cc +++ b/src/3rdparty/double-conversion/strtod.cc @@ -198,6 +198,12 @@ static bool DoubleStrtod(Vector trimmed, int exponent, double* result) { #if !defined(DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS) + // NB: Qt uses -Werror=unused-parameter which results in compiler error here + // in this branch. Using "(void)x" idiom to prevent the error. + (void)trimmed; + (void)exponent; + (void)result; + // On x86 the floating-point stack can be 64 or 80 bits wide. If it is // 80 bits wide (as is the case on Linux) then double-rounding occurs and the // result is not accurate.