mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
MSVC: fix signed/unsigned comparison
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
6abbe579a2
commit
be8d71dad8
@ -122,7 +122,7 @@ std::pair<Frame::Header *, bool> FrameFactory::prepareFrameHeader(
|
||||
// A quick sanity check -- make sure that the frameID is 4 uppercase Latin1
|
||||
// characters. Also make sure that there is data in the frame.
|
||||
|
||||
if(frameID.size() != (version < 3 ? 3 : 4) ||
|
||||
if(frameID.size() != (version < 3U ? 3U : 4U) ||
|
||||
header->frameSize() <= static_cast<unsigned int>(header->dataLengthIndicator() ? 4 : 0) ||
|
||||
header->frameSize() > data.size())
|
||||
{
|
||||
|
@ -28,6 +28,7 @@
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
#else
|
||||
# include <climits>
|
||||
# include <cstdio>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
@ -326,7 +327,8 @@ void FileStream::removeBlock(offset_t start, size_t length)
|
||||
|
||||
ByteVector buffer(bufferLength);
|
||||
|
||||
for(unsigned int bytesRead = -1; bytesRead != 0;) {
|
||||
unsigned int bytesRead = UINT_MAX;
|
||||
while(bytesRead != 0) {
|
||||
seek(readPosition);
|
||||
bytesRead = static_cast<unsigned int>(readFile(d->file, buffer));
|
||||
readPosition += bytesRead;
|
||||
|
Loading…
Reference in New Issue
Block a user