Cast TTF_FontFaceFamilyName from const char * ...

...to char *

Trying to avoid warning Shin-ichi reported

  warning: assignment discards 'const' qualifier from pointer target type
This commit is contained in:
Bill Kendrick 2023-06-21 22:43:52 -07:00
parent 04d0116ae5
commit 9199174dca

View file

@ -26834,7 +26834,7 @@ static void set_label_fonts()
/* FIXME: 2009/09/13 TTF_FontFaceFamilyName() appends random "\n" at the end /* FIXME: 2009/09/13 TTF_FontFaceFamilyName() appends random "\n" at the end
of the returned string. Should investigate why, and when corrected, of the returned string. Should investigate why, and when corrected,
remove the code that deals whith the ending "\n"s in ttffont */ remove the code that deals whith the ending "\n"s in ttffont */
ttffont = TTF_FontFaceFamilyName(getfonthandle(i)->ttf_font); ttffont = (char *) TTF_FontFaceFamilyName(getfonthandle(i)->ttf_font);
for (c = 0; c < strlen(ttffont); c++) for (c = 0; c < strlen(ttffont); c++)
if (ttffont[c] == '\n') if (ttffont[c] == '\n')
ttffont[c] = '\0'; ttffont[c] = '\0';