]> granicus.if.org Git - graphviz/commitdiff
pango: initialize a variable
authorCosta Shulyupin <constantine.shulyupin@gmail.com>
Sun, 27 Mar 2022 04:10:40 +0000 (07:10 +0300)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 2 Apr 2022 18:59:53 +0000 (11:59 -0700)
Squash
warning: ‘availfaces’ may be used uninitialized in this function

Actually uninitialized value is not used because it is used
in pair with family_name, but compiler still complains.
So just add initializtion.

plugin/pango/gvgetfontlist_pango.c

index d1dcc90112c10a5caf18f8382a5f6fd194d0d5a7..dcf4f3a3b16b6ac4b2f8ac521599104ee7a7f72a 100644 (file)
@@ -329,7 +329,7 @@ static availfont_t *gv_get_ps_fontlist(PangoFontMap * fontmap)
     PangoFontFamily *family;
     fontdef_t* gv_ps_fontdef;
     int n_families;
-    int i, k, array_sz, availfaces;
+    int i, k, array_sz, availfaces = 0;
     availfont_t *gv_af_p, *gv_afs;
     const char *name;
     char *family_name;