From c68fe9ad7b43cf18186855107a7f53c534d08a27 Mon Sep 17 00:00:00 2001 From: Elia Cereda Date: Sat, 30 Jun 2012 16:25:33 +0200 Subject: [PATCH] Fixed error "Branch condition evaluates to a garbage value" (from Xcode 4.3.3 Static Analyzer, mpeg/id3v2/id3v2tag.cpp:377) This error occurs when the frame variable is left uninitialized because its id doesn't match any of the ids in the if and else-id cases. Initializing it on declaration fixes this issue. --- taglib/mpeg/id3v2/id3v2tag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taglib/mpeg/id3v2/id3v2tag.cpp b/taglib/mpeg/id3v2/id3v2tag.cpp index ce228330..c6fe7b74 100644 --- a/taglib/mpeg/id3v2/id3v2tag.cpp +++ b/taglib/mpeg/id3v2/id3v2tag.cpp @@ -365,7 +365,7 @@ void ID3v2::Tag::removeUnsupportedProperties(const StringList &properties) if(it->size() <= 5) continue; // invalid specification String description = it->substr(5); - Frame *frame; + Frame *frame = NULL; if(id == "TXXX") frame = UserTextIdentificationFrame::find(this, description); else if(id == "WXXX") -- 2.40.0