summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-25 10:53:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-25 22:38:40 +0200
commitf54cba63809c511106f291e66019ebe57eafdfe0 (patch)
tree8009b285f1917bbd227cd2749bd9e33d2b85a8f0 /external
parent408be00b15ec44c9750450fc4dba70120dd0e978 (diff)
Silence -Werror,-Wunused-but-set-variable (clang-cl 13 trunk)
...during build of ExternalProject_harfbuzz: > In file included from hb-ot-shape-complex-myanmar.cc:136: > hb-ot-shape-complex-myanmar-machine.rl(108,36): error: variable 'act' set but not used [-Werror,-Wunused-but-set-variable] > unsigned int p, pe, eof, ts, te, act HB_UNUSED; > ^ Change-Id: Ie75a5cfa16c29c02e1b97380ebd63e7d789926f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117850 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/harfbuzz/UnpackedTarball_harfbuzz.mk1
-rw-r--r--external/harfbuzz/Wunused-but-set-variable.patch12
2 files changed, 13 insertions, 0 deletions
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index adec72ed0d57..49119e30861b 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
external/harfbuzz/ubsan.patch \
external/harfbuzz/icu-65-api-macros-with-semicolon.patch.1 \
+ external/harfbuzz/Wunused-but-set-variable.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/harfbuzz/Wunused-but-set-variable.patch b/external/harfbuzz/Wunused-but-set-variable.patch
new file mode 100644
index 000000000000..2150c737e489
--- /dev/null
+++ b/external/harfbuzz/Wunused-but-set-variable.patch
@@ -0,0 +1,12 @@
+--- src/hb.hh
++++ src/hb.hh
+@@ -242,7 +242,7 @@
+ #define HB_CONST_FUNC
+ #define HB_PRINTF_FUNC(format_idx, arg_idx)
+ #endif
+-#if defined(__GNUC__) && (__GNUC__ >= 4)
++#if defined(__GNUC__) && (__GNUC__ >= 4) || defined __clang__
+ #define HB_UNUSED __attribute__((unused))
+ #elif defined(_MSC_VER) /* https://github.com/harfbuzz/harfbuzz/issues/635 */
+ #define HB_UNUSED __pragma(warning(suppress: 4100 4101))
+