From bf8524fe5c8eb20c03f0732c3c782a330e97594e Mon Sep 17 00:00:00 2001 From: Oleg Oshmyan Date: Thu, 29 Oct 2015 00:19:20 +0200 Subject: fontselect: silence warnings about discarding const Fixing this properly involves constifying ASS_FontProviderMetaData and refactoring code that allocates and frees strings stored in it. This seems easy on the surface but turns out to be nontrivial when you actually try to do it. This may still be done at a later date, but for now, just add explicit casts. --- libass/ass_fontselect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 2259265..e4be338 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -603,7 +603,7 @@ static char *select_font(ASS_FontSelector *priv, ASS_Library *library, ASS_FontProviderMetaData default_meta = { .n_fullname = 1, - .fullnames = &family, + .fullnames = (char **)&family, }; // Get a list of substitutes if applicable, and use it for matching. @@ -787,7 +787,7 @@ get_font_info(FT_Library lib, FT_Face face, ASS_FontProviderMetaData *info) info->weight = weight; info->width = 100; // FIXME, should probably query the OS/2 table - info->postscript_name = FT_Get_Postscript_Name(face); + info->postscript_name = (char *)FT_Get_Postscript_Name(face); info->is_postscript = !FT_Get_PS_Font_Info(face, &postscript_info); info->families = calloc(sizeof(char *), num_family); -- cgit v1.2.3