diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-29 00:19:20 +0200 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2015-10-29 00:20:51 +0200 |
commit | bf8524fe5c8eb20c03f0732c3c782a330e97594e (patch) | |
tree | 7583901bad01382844d2f58a4b331c1af3c5c6a1 | |
parent | e3c899b6614bda68de4c1e7747828744144afeb2 (diff) | |
download | libass-bf8524fe5c8eb20c03f0732c3c782a330e97594e.tar.bz2 libass-bf8524fe5c8eb20c03f0732c3c782a330e97594e.tar.xz |
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.
-rw-r--r-- | libass/ass_fontselect.c | 4 |
1 files 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); |