diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2021-01-15 16:02:44 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-01-17 23:35:39 +0000 |
commit | b4937f32956b28f476bf9530d53576c23873024a (patch) | |
tree | 02b0f42b228f11a133e7e1296401ffd3d265eebc /src/3rdparty/double-conversion | |
parent | f79192815fdd114945d901e8c169f5d93d44954c (diff) |
Add "Q_UNUSED" to (3rdparty) strtod.cc for a 32 bit code path
Accidentally stepped on this thing. Cannot build Qt Core on 32-bit
Ubuntu 16 without this patch.
Fixes: QTBUG-90354
Change-Id: Iab5b2a317ee18b537b416eff008db29932fc043b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b101f84f86e541fa30c0d6d2a4e549cf51118706)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/3rdparty/double-conversion')
-rw-r--r-- | src/3rdparty/double-conversion/patches/0001-Fix-unused-parameter-compiler-warning-on-32-bit-Linux.patch | 17 | ||||
-rw-r--r-- | src/3rdparty/double-conversion/strtod.cc | 6 |
2 files changed, 23 insertions, 0 deletions
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 0000000000..ad986f10e1 --- /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<const char> 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 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<const char> 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. |