More -Wcast-error fixes

This commit is contained in:
Behdad Esfahbod 2019-01-22 12:43:12 +01:00
parent 9077272549
commit 81ec543d80
3 changed files with 7 additions and 7 deletions

View File

@ -244,7 +244,7 @@ hb_font_get_glyph_h_advances_default (hb_font_t* font,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
first_glyph = (hb_codepoint_t *) &StructAtOffset<char> (first_glyph, glyph_stride);
first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
first_advance = (hb_position_t *) &StructAtOffset<char> (first_advance, advance_stride);
#pragma GCC diagnostic pop
}
return;
@ -258,7 +258,7 @@ hb_font_get_glyph_h_advances_default (hb_font_t* font,
*first_advance = font->parent_scale_x_distance (*first_advance);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
first_advance = (hb_position_t *) &StructAtOffset<char> (first_advance, advance_stride);
#pragma GCC diagnostic pop
}
}
@ -282,7 +282,7 @@ hb_font_get_glyph_v_advances_default (hb_font_t* font,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
first_glyph = (hb_codepoint_t *) &StructAtOffset<char> (first_glyph, glyph_stride);
first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
first_advance = (hb_position_t *) &StructAtOffset<char> (first_advance, advance_stride);
#pragma GCC diagnostic pop
}
return;
@ -296,7 +296,7 @@ hb_font_get_glyph_v_advances_default (hb_font_t* font,
*first_advance = font->parent_scale_y_distance (*first_advance);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
first_advance = (hb_position_t *) &StructAtOffset<char> (first_advance, advance_stride);
#pragma GCC diagnostic pop
}
}

View File

@ -298,7 +298,7 @@ hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
first_glyph = (hb_codepoint_t *) &StructAtOffset<char> (first_glyph, glyph_stride);
first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
first_advance = (hb_position_t *) &StructAtOffset<char> (first_advance, advance_stride);
#pragma GCC diagnostic pop
}
}

View File

@ -115,7 +115,7 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
first_glyph = (hb_codepoint_t *) &StructAtOffset<char> (first_glyph, glyph_stride);
first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
first_advance = (hb_position_t *) &StructAtOffset<char> (first_advance, advance_stride);
#pragma GCC diagnostic pop
}
}
@ -138,7 +138,7 @@ hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data,
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
first_glyph = (hb_codepoint_t *) &StructAtOffset<char> (first_glyph, glyph_stride);
first_advance = &StructAtOffset<hb_position_t> (first_advance, advance_stride);
first_advance = (hb_position_t *) &StructAtOffset<char> (first_advance, advance_stride);
#pragma GCC diagnostic pop
}
}