diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-08-15 08:16:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-08-15 11:17:16 +0200 |
commit | 49f392feb98feb2f69fafbed45ad5aa60c179e64 (patch) | |
tree | e08b1799bbe680b579d86eb270d54530e34ad68e | |
parent | tdf#150382 writerfilter,sw: RTF import of paragraph border override (diff) | |
download | core-49f392feb98feb2f69fafbed45ad5aa60c179e64.tar.gz core-49f392feb98feb2f69fafbed45ad5aa60c179e64.zip |
external/cairo: Fix -Wincompatible-function-pointer-types
...with recent Clang 16 trunk since
<https://github.com/llvm/llvm-project/commit/af01f717c48f0fd2481600ed6c00441763365b62>
"Default implicit function pointer conversions diagnostic to be an error",
causing
> pixman-bits-image.c:1184:39: error: incompatible function pointer types passing 'const float (int, int)' to parameter of type 'dither_factor_t' (aka 'float (*)(int, int)') [-Wincompatible-function-pointer-types]
> buffer = dither_apply_ordered (iter, dither_factor_blue_noise_64);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> pixman-bits-image.c:1130:60: note: passing argument to parameter 'factor' here
> dither_apply_ordered (pixman_iter_t *iter, dither_factor_t factor)
> ^
> pixman-bits-image.c:1189:39: error: incompatible function pointer types passing 'const float (int, int)' to parameter of type 'dither_factor_t' (aka 'float (*)(int, int)') [-Wincompatible-function-pointer-types]
> buffer = dither_apply_ordered (iter, dither_factor_bayer_8);
> ^~~~~~~~~~~~~~~~~~~~~
> pixman-bits-image.c:1130:60: note: passing argument to parameter 'factor' here
> dither_apply_ordered (pixman_iter_t *iter, dither_factor_t factor)
> ^
Change-Id: I3e28280c9c25dfb7cee5155719a71655db00e344
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138265
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | external/cairo/UnpackedTarball_pixman.mk | 1 | ||||
-rw-r--r-- | external/cairo/pixman/Wincompatible-function-pointer-types.patch.0 | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/external/cairo/UnpackedTarball_pixman.mk b/external/cairo/UnpackedTarball_pixman.mk index 3f1f75616611..327041a1b141 100644 --- a/external/cairo/UnpackedTarball_pixman.mk +++ b/external/cairo/UnpackedTarball_pixman.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,pixman,$(PIXMAN_TARBALL),,cairo)) $(eval $(call gb_UnpackedTarball_add_patches,pixman,\ external/cairo/pixman/pixman-0.24.4.patch \ external/cairo/pixman/pixman-ubsan.patch \ + external/cairo/pixman/Wincompatible-function-pointer-types.patch.0 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/cairo/pixman/Wincompatible-function-pointer-types.patch.0 b/external/cairo/pixman/Wincompatible-function-pointer-types.patch.0 new file mode 100644 index 000000000000..7f43a350af35 --- /dev/null +++ b/external/cairo/pixman/Wincompatible-function-pointer-types.patch.0 @@ -0,0 +1,19 @@ +--- pixman/pixman-bits-image.c ++++ pixman/pixman-bits-image.c +@@ -1851,14 +1851,14 @@ + iter->y++; + } + +-static const float ++static float + dither_factor_blue_noise_64 (int x, int y) + { + float m = dither_blue_noise_64x64[((y & 0x3f) << 6) | (x & 0x3f)]; + return m * (1. / 4096.f) + (1. / 8192.f); + } + +-static const float ++static float + dither_factor_bayer_8 (int x, int y) + { + uint32_t m; |