From f299fc899c28eee83ed6d37fb73c492f7710391b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 8 Feb 2014 17:27:51 +0100 Subject: [PATCH] id3v2mux: Fix unitialized variable compiler warning error: variable 'image_type' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] --- ext/taglib/gstid3v2mux.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc index 27f4c80..f47c31e 100644 --- a/ext/taglib/gstid3v2mux.cc +++ b/ext/taglib/gstid3v2mux.cc @@ -461,7 +461,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list, if (strcmp (tag, GST_TAG_PREVIEW_IMAGE) == 0) { frame->setType (ID3v2::AttachedPictureFrame::FileIcon); } else { - int image_type; + int image_type = image_type = ID3v2::AttachedPictureFrame::Other; if (info_struct) { if (gst_structure_get (info_struct, "image-type", @@ -471,8 +471,6 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list, } else { image_type = ID3v2::AttachedPictureFrame::Other; } - } else { - image_type = ID3v2::AttachedPictureFrame::Other; } } -- 2.7.4