aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2021-11-05 14:45:20 -0700
committerBehdad Esfahbod <behdad@behdad.org>2021-11-05 14:45:20 -0700
commit07dc34bdaf977a3be97ab5a68455ed7a67f80a06 (patch)
tree768202d1a8e63a13b04cc29766448a09eb2aed0c
parent77eeec53a917554a2766a7cb1687607841282777 (diff)
downloadharfbuzz_ng-07dc34bdaf977a3be97ab5a68455ed7a67f80a06.tar.gz
[mutex] Try work around GCC cast-align error/warning
Shouldn't be needed because of the alignas(). Oh well... Might fix https://github.com/harfbuzz/harfbuzz/issues/3283
-rw-r--r--src/hb-mutex.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hb-mutex.hh b/src/hb-mutex.hh
index 4e135027f..6914b2245 100644
--- a/src/hb-mutex.hh
+++ b/src/hb-mutex.hh
@@ -97,10 +97,13 @@ struct hb_mutex_t
/* Create space for, but do not initialize m. */
alignas(hb_mutex_impl_t) char m[sizeof (hb_mutex_impl_t)];
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-align"
void init () { hb_mutex_impl_init ((hb_mutex_impl_t *) m); }
void lock () { hb_mutex_impl_lock ((hb_mutex_impl_t *) m); }
void unlock () { hb_mutex_impl_unlock ((hb_mutex_impl_t *) m); }
void fini () { hb_mutex_impl_finish ((hb_mutex_impl_t *) m); }
+#pragma GCC diagnostic pop
};
struct hb_lock_t