font: Check return value from _cairo_ft_unscaled_font_lock_face

cairo-ft-font.c: In function ‘_cairo_ft_has_color_glyphs’:
cairo-ft-font.c:3011:9: warning: ignoring return value of ‘_cairo_ft_unscaled_font_lock_face’, declared with attribute warn_unused_result [-Wunused-result]
         _cairo_ft_unscaled_font_lock_face (unscaled);
         ^
This commit is contained in:
Bryce Harrington 2018-01-23 19:47:57 -08:00
parent bc335a741f
commit 1cbebafe89

View file

@ -3008,8 +3008,11 @@ _cairo_ft_has_color_glyphs (void *scaled)
cairo_ft_unscaled_font_t *unscaled = ((cairo_ft_scaled_font_t *)scaled)->unscaled;
if (!unscaled->have_color_set) {
_cairo_ft_unscaled_font_lock_face (unscaled);
_cairo_ft_unscaled_font_unlock_face (unscaled);
FT_Face face;
face = _cairo_ft_unscaled_font_lock_face (unscaled);
if (unlikely (face == NULL))
return FALSE;
_cairo_ft_unscaled_font_unlock_face (unscaled);
}
return unscaled->have_color;