mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
app: fix build warnings.
This fixes 2 such warnings: > app/text/gimpfontfactory.c: In function ‘gimp_font_factory_load_names’: > /usr/include/glib-2.0/glib/gstring.h:74:5: warning: ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’ [-Wunused-result] The (void) ! trick was also possible but this is so ugly so I went for actual usage of the return value as we should. Also clean up some trailing whitespaces.
This commit is contained in:
@@ -760,7 +760,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory)
|
||||
FcFontSet *fontset;
|
||||
FT_Library ft;
|
||||
GSList *xml_configs_list;
|
||||
GString *xml;
|
||||
GString *xml;
|
||||
GString *xml_bold_variant;
|
||||
GString *xml_italic_variant;
|
||||
GString *xml_bold_italic_variant_and_global;
|
||||
@@ -855,7 +855,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory)
|
||||
|
||||
/*
|
||||
* Pango doesn't support non SFNT fonts because harfbuzz doesn't support them.
|
||||
* woff and woff2, not supported by pango (because they are not yet supported by harfbuzz,
|
||||
* woff and woff2, not supported by pango (because they are not yet supported by harfbuzz,
|
||||
* when using harfbuzz's default loader, which is how pango uses it).
|
||||
* pcf,pcf.gz are bitmap font formats, not supported by pango (because of harfbuzz).
|
||||
* afm, pfm, pfb are type1 font formats, not supported by pango (because of harfbuzz).
|
||||
@@ -930,14 +930,13 @@ gimp_font_factory_load_names (GimpFontFactory *factory)
|
||||
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml->str);
|
||||
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, "</fontconfig>");
|
||||
|
||||
xml_configs_list = g_slist_append (xml_configs_list, xml_bold_italic_variant_and_global->str);
|
||||
|
||||
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml_bold_italic_variant_and_global->str, FcTrue);
|
||||
|
||||
xml_configs_list = g_slist_append (xml_configs_list, g_string_free (xml_bold_italic_variant_and_global, FALSE));
|
||||
|
||||
g_string_free (xml, TRUE);
|
||||
g_string_free (xml_italic_variant, TRUE);
|
||||
g_string_free (xml_bold_variant, TRUE);
|
||||
g_string_free (xml_bold_italic_variant_and_global, FALSE);
|
||||
|
||||
xml = g_string_new (NULL);
|
||||
xml_italic_variant = g_string_new (NULL);
|
||||
@@ -1128,14 +1127,13 @@ gimp_font_factory_load_names (GimpFontFactory *factory)
|
||||
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml->str);
|
||||
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, "</fontconfig>");
|
||||
|
||||
xml_configs_list = g_slist_append (xml_configs_list, xml_bold_italic_variant_and_global->str);
|
||||
|
||||
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml_bold_italic_variant_and_global->str, FcTrue);
|
||||
|
||||
xml_configs_list = g_slist_append (xml_configs_list, g_string_free (xml_bold_italic_variant_and_global, FALSE));
|
||||
|
||||
g_string_free (xml, TRUE);
|
||||
g_string_free (xml_italic_variant, TRUE);
|
||||
g_string_free (xml_bold_variant, TRUE);
|
||||
g_string_free (xml_bold_italic_variant_and_global, FALSE);
|
||||
}
|
||||
|
||||
g_slist_free_full (GET_PRIVATE (factory)->fonts_renaming_config, (GDestroyNotify) g_free);
|
||||
|
Reference in New Issue
Block a user