[pragma] Allow cast-align in hb-font.cc
../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]': ../src/hb-font.cc:144:85: required from here ../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align] { return * reinterpret_cast<const Type*> ((const char *) P + offset); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]': ../src/hb-font.cc:145:79: required from here ../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align] { return * reinterpret_cast<Type*> ((char *) P + offset); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = int]':
This commit is contained in:
parent
a25174a56b
commit
0d8b931bbe
@ -51,6 +51,9 @@
|
||||
* hb_font_funcs_t
|
||||
*/
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-align" // API taking in *_stride needs it
|
||||
|
||||
static hb_bool_t
|
||||
hb_font_get_font_h_extents_nil (hb_font_t *font HB_UNUSED,
|
||||
void *font_data HB_UNUSED,
|
||||
@ -2036,3 +2039,5 @@ hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
|
||||
trampoline,
|
||||
trampoline_destroy);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
Loading…
Reference in New Issue
Block a user