From 784d1180de19fbf4948f08ee2124277cc06066dd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 11 Jan 2017 11:58:13 -0800 Subject: [PATCH] Fix build with clang --- src/hb-open-type-private.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index e0d5fae6f..8845e3eee 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -1133,11 +1133,11 @@ struct hb_lazy_table_loader_t inline const T* get (void) const { retry: - const T *p = (T *) hb_atomic_ptr_get (&instance); + T *p = (T *) hb_atomic_ptr_get (&instance); if (unlikely (!p)) { hb_blob_t *blob_ = OT::Sanitizer::sanitize (face->reference_table (T::tableTag)); - p = OT::Sanitizer::lock_instance (blob_); + p = const_cast(OT::Sanitizer::lock_instance (blob_)); if (!hb_atomic_ptr_cmpexch (const_cast(&instance), NULL, p)) { hb_blob_destroy (blob_);