Fix misc warnings reported by cppcheck https://bugs.freedesktop.org/show_bug.cgi?id=65544
diff --git a/util/ansi-print.cc b/util/ansi-print.cc index e166c91..0fc3719 100644 --- a/util/ansi-print.cc +++ b/util/ansi-print.cc
@@ -157,6 +157,7 @@ biimage_t (unsigned int width, unsigned int height) : width (width), height (height), + bg (0), fg (0), unicolor (true), data ((uint8_t *) malloc (sizeof (data[0]) * width * height)) {} ~biimage_t (void) { free (data); }
diff --git a/util/hb-ot-shape-closure.cc b/util/hb-ot-shape-closure.cc index fd9756b..7c81a7d 100644 --- a/util/hb-ot-shape-closure.cc +++ b/util/hb-ot-shape-closure.cc
@@ -79,8 +79,9 @@ first = false; else printf (" "); - char glyph_name[32]; - if (show_glyph_names) { + if (show_glyph_names) + { + char glyph_name[64]; hb_font_get_glyph_name (font, i, glyph_name, sizeof (glyph_name)); printf ("%s", glyph_name); } else
diff --git a/util/hb-shape.cc b/util/hb-shape.cc index 852f9cf..b62f744 100644 --- a/util/hb-shape.cc +++ b/util/hb-shape.cc
@@ -33,7 +33,10 @@ output_buffer_t (option_parser_t *parser) : options (parser, g_strjoinv ("/", (gchar**) hb_buffer_serialize_list_formats ())), - format (parser) {} + format (parser), + gs (NULL), + line_no (0), + font (NULL) {} void init (const font_options_t *font_opts) {
diff --git a/util/shape-consumer.hh b/util/shape-consumer.hh index 8fd7ec3..422c8cd 100644 --- a/util/shape-consumer.hh +++ b/util/shape-consumer.hh
@@ -34,8 +34,10 @@ struct shape_consumer_t { shape_consumer_t (option_parser_t *parser) - : shaper (parser), - output (parser) {} + : failed (false), + shaper (parser), + output (parser), + font (NULL) {} void init (const font_options_t *font_opts) {
diff --git a/util/view-cairo.hh b/util/view-cairo.hh index f273464..8fe74fa 100644 --- a/util/view-cairo.hh +++ b/util/view-cairo.hh
@@ -31,10 +31,12 @@ #define VIEW_CAIRO_HH -struct view_cairo_t { +struct view_cairo_t +{ view_cairo_t (option_parser_t *parser) : output_options (parser, helper_cairo_supported_formats), - view_options (parser) {} + view_options (parser), + lines (0), scale (1.0) {} ~view_cairo_t (void) { if (debug) cairo_debug_reset_static_data ();