summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-07-15 19:08:28 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-07-15 19:45:03 +0800
commit1bbc591269ea4693665ecead7a9592ed4372a091 (patch)
treec94ca508b37c672c264233e200a8214bfe5e1405
parentdde5d513213c7f778f3bc762bb098f2fee41fe17 (diff)
downloadpango-1bbc591269ea4693665ecead7a9592ed4372a091.tar.gz
pangofc-font.c: Trivial fix on pre-C99 compilers
Make sure we declare variables at the top of the block.
-rw-r--r--pango/pangofc-font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index 5a1c30be..870fd935 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -599,8 +599,6 @@ pango_fc_font_get_metrics (PangoFont *font,
if (!in_get_metrics)
{
- in_get_metrics = 1;
-
/* Compute derived metrics */
PangoLayout *layout;
PangoRectangle extents;
@@ -608,6 +606,8 @@ pango_fc_font_get_metrics (PangoFont *font,
PangoFontDescription *desc = pango_font_describe_with_absolute_size (font);
gulong sample_str_width;
+ in_get_metrics = 1;
+
layout = pango_layout_new (context);
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);