From 83d4aa5ca9a39dbe66db9b81b34f5b568503bd7e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 22 Jan 2019 12:52:23 +0100 Subject: [PATCH] More -Wcast-error fix --- src/hb-dsalgs.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index 9cfa290a6..cb3057c54 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -236,10 +236,13 @@ hb_ctz (T v) template static inline T* hb_addressof (T& arg) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" /* https://en.cppreference.com/w/cpp/memory/addressof */ return reinterpret_cast( &const_cast( reinterpret_cast(arg))); +#pragma GCC diagnostic pop } /* ASCII tag/character handling */