office-gobmx/external/skia/clang-attributes-warning.patch.1
Noel Grandin f532894afd update to skia m126
Change-Id: Id5f93ad07171228cf0701bd330be1ccf51c32e51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174739
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-10 12:48:26 +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;
}