aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2020-05-02 15:40:24 -0700
committerThiago Macieira <thiago.macieira@intel.com>2020-05-05 22:24:58 -0700
commit1250d8b5b95eecac767a23563717e53faa5d3b8a (patch)
tree964ec8e3bda99d19bbe4200696249a8ba937606b /src/3rdparty
parentb2f8d680d65b987ab88c41a2f76e6becbad62864 (diff)
Fix Clang 10 warning about converting ULLONG_MAX to double
The compiler must convert ULLONG_MAX to double before adding 1, so this expression was wrong. MathExtras.h:402:43: error: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] Task-number: QTBUG-83666 Pick-To: 5.15 Change-Id: I99ab0f318b1c43b89888fffd160b4a95a258423b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/masm/wtf/MathExtras.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/3rdparty/masm/wtf/MathExtras.h b/src/3rdparty/masm/wtf/MathExtras.h
index a529ba7b37..6af108c886 100644
--- a/src/3rdparty/masm/wtf/MathExtras.h
+++ b/src/3rdparty/masm/wtf/MathExtras.h
@@ -399,7 +399,7 @@ inline void doubleToInteger(double d, unsigned long long& value)
value = 0;
else {
// -2^{64} < fmodValue < 2^{64}.
- double fmodValue = fmod(trunc(d), std::numeric_limits<unsigned long long>::max() + 1.0);
+ double fmodValue = fmod(trunc(d), -2.0 * std::numeric_limits<long long>::min());
if (fmodValue >= 0) {
// 0 <= fmodValue < 2^{64}.
// 0 <= value < 2^{64}. This cast causes no loss.