From: Lukáš Lalinský Date: Fri, 4 Sep 2009 08:50:24 +0000 (+0000) Subject: Fix compilation warnings X-Git-Tag: v1.6~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0adea1072846e4124da36ddc9a089c77b0d0c69d;p=taglib Fix compilation warnings git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1019655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- diff --git a/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp b/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp index ee8f3e0b..a763e183 100644 --- a/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp +++ b/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp @@ -137,7 +137,7 @@ void AttachedPictureFrame::parseFields(const ByteVector &data) d->mimeType = readStringField(data, String::Latin1, &pos); /* Now we need at least two more bytes available */ - if (pos + 1 >= data.size()) { + if (uint(pos) + 1 >= data.size()) { debug("Truncated picture frame."); return; } diff --git a/taglib/ogg/oggfile.cpp b/taglib/ogg/oggfile.cpp index de9fce96..042ed380 100644 --- a/taglib/ogg/oggfile.cpp +++ b/taglib/ogg/oggfile.cpp @@ -394,8 +394,8 @@ void Ogg::File::writePageGroup(const List &thePageGroup) // First step: Pages that contain the comment data for(List::ConstIterator it = pages.begin(); it != pages.end(); ++it) { - const int index = (*it)->header()->pageSequenceNumber(); - if(index < static_cast(d->pages.size())) { + const unsigned int index = (*it)->header()->pageSequenceNumber(); + if(index < d->pages.size()) { delete d->pages[index]; d->pages[index] = *it; } @@ -411,8 +411,8 @@ void Ogg::File::writePageGroup(const List &thePageGroup) // Second step: the renumbered pages for(List::ConstIterator it = renumberedPages.begin(); it != renumberedPages.end(); ++it) { - const int index = (*it)->header()->pageSequenceNumber(); - if(index < static_cast(d->pages.size())) { + const unsigned int index = (*it)->header()->pageSequenceNumber(); + if(index < d->pages.size()) { delete d->pages[index]; d->pages[index] = *it; } diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp index 25ada552..595691f5 100644 --- a/taglib/riff/rifffile.cpp +++ b/taglib/riff/rifffile.cpp @@ -167,7 +167,7 @@ void RIFF::File::read() ByteVector chunkName = readBlock(4); uint chunkSize = readBlock(4).toUInt(bigEndian); - if(tell() + chunkSize > length()) { + if(tell() + chunkSize > uint(length())) { // something wrong break; }