]> granicus.if.org Git - taglib/commitdiff
Fixed error "Branch condition evaluates to a garbage value" (from Xcode 4.3.3 Static...
authorElia Cereda <eliacereda@gmail.com>
Sat, 30 Jun 2012 14:25:33 +0000 (16:25 +0200)
committerElia Cereda <eliacereda@gmail.com>
Sat, 30 Jun 2012 14:25:33 +0000 (16:25 +0200)
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

index ce22833071fdac12fa6a0a0d1a351d71f44ba30a..c6fe7b746f08375ee2a31e85f35a67ee74de59d7 100644 (file)
@@ -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")