Warning, /graphics/krita/3rdparty/ext_qt/0138-Fix-Clang-10-warning-about-converting-ULLONG_MAX-to-.patch is written in an unsupported language. File is not indexed.
0001 From d67ee3e77fc7e1a614b0b9ef6cb2156cd3dbd3e3 Mon Sep 17 00:00:00 2001 0002 From: Thiago Macieira <thiago.macieira@intel.com> 0003 Date: Sat, 2 May 2020 15:40:24 -0700 0004 Subject: [PATCH 138/139] Fix Clang 10 warning about converting ULLONG_MAX to 0005 double 0006 0007 The compiler must convert ULLONG_MAX to double before adding 1, so this 0008 expression was wrong. 0009 0010 MathExtras.h:402:43: error: implicit conversion from 'unsigned long long' to 'double' changes value from 0011 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] 0012 0013 Task-number: QTBUG-83666 0014 Change-Id: I99ab0f318b1c43b89888fffd160b4a95a258423b 0015 Reviewed-by: Lars Knoll <lars.knoll@qt.io> 0016 (cherry picked from commit 1250d8b5b95eecac767a23563717e53faa5d3b8a) 0017 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> 0018 (cherry picked from commit 9a29c05b1ed3190a308b616c0955c0dd99b8ccf8) 0019 Signed-off-by: L. E. Segovia <amy@amyspark.me> 0020 --- 0021 src/3rdparty/masm/wtf/MathExtras.h | 2 +- 0022 1 file changed, 1 insertion(+), 1 deletion(-) 0023 0024 diff --git a/src/3rdparty/masm/wtf/MathExtras.h b/src/3rdparty/masm/wtf/MathExtras.h 0025 index a529ba7b..6af108c8 100644 0026 --- a/src/3rdparty/masm/wtf/MathExtras.h 0027 +++ b/src/3rdparty/masm/wtf/MathExtras.h 0028 @@ -399,7 +399,7 @@ inline void doubleToInteger(double d, unsigned long long& value) 0029 value = 0; 0030 else { 0031 // -2^{64} < fmodValue < 2^{64}. 0032 - double fmodValue = fmod(trunc(d), std::numeric_limits<unsigned long long>::max() + 1.0); 0033 + double fmodValue = fmod(trunc(d), -2.0 * std::numeric_limits<long long>::min()); 0034 if (fmodValue >= 0) { 0035 // 0 <= fmodValue < 2^{64}. 0036 // 0 <= value < 2^{64}. This cast causes no loss. 0037 -- 0038 2.37.3 0039