1
0
Fork 0
libreoffice/external/skia/clang-attributes-warning.patch.1
Daniel Baumann 8e63e14cf6
Adding upstream version 4:25.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 16:20:04 +02:00

30 lines
1.2 KiB
Groff

diff -ur skia.org/include/private/base/SkFloatingPoint.h skia/include/private/base/SkFloatingPoint.h
--- skia.org/include/private/base/SkFloatingPoint.h 2024-10-04 15:22:58.494566218 +0200
+++ skia/include/private/base/SkFloatingPoint.h 2024-10-04 15:23:49.102832411 +0200
@@ -132,7 +132,9 @@
// Cast double to float, ignoring any warning about too-large finite values being cast to float.
// Clang thinks this is undefined, but it's actually implementation defined to return either
// the largest float or infinity (one of the two bracketing representable floats). Good enough!
+#if defined(__clang__)
SK_NO_SANITIZE("float-cast-overflow")
+#endif
static constexpr float sk_double_to_float(double x) {
return static_cast<float>(x);
}
@@ -161,12 +163,16 @@
#pragma warning(push)
#pragma warning(disable : 4723)
#endif
+#if defined(__clang__)
SK_NO_SANITIZE("float-divide-by-zero")
+#endif
static constexpr float sk_ieee_float_divide(float numer, float denom) {
return numer / denom;
}
+#if defined(__clang__)
SK_NO_SANITIZE("float-divide-by-zero")
+#endif
static constexpr double sk_ieee_double_divide(double numer, double denom) {
return numer / denom;
}