diff --git a/taglib/flac/flacproperties.cpp b/taglib/flac/flacproperties.cpp index efc9fa1b..9f0f9256 100644 --- a/taglib/flac/flacproperties.cpp +++ b/taglib/flac/flacproperties.cpp @@ -159,8 +159,8 @@ void FLAC::Properties::read(const ByteVector &data, long streamLength) // The last 4 bits are the most significant 4 bits for the 36 bit // stream length in samples. (Audio files measured in days) - const ulonglong hi = flags & 0xf; - const ulonglong lo = data.toUInt(pos, true); + const unsigned long long hi = flags & 0xf; + const unsigned long long lo = data.toUInt(pos, true); pos += 4; d->sampleFrames = (hi << 32) | lo; diff --git a/taglib/riff/rifffile.cpp b/taglib/riff/rifffile.cpp index 1d834b04..8317a57e 100644 --- a/taglib/riff/rifffile.cpp +++ b/taglib/riff/rifffile.cpp @@ -252,7 +252,7 @@ void RIFF::File::read() break; } - if(static_cast(tell()) + chunkSize > static_cast(length())) { + if(static_cast(tell()) + chunkSize > length()) { debug("RIFF::File::read() -- Chunk '" + chunkName + "' has invalid size (larger than the file size)"); setValid(false); break; @@ -278,8 +278,8 @@ void RIFF::File::read() chunk.padding = 1; } } - d->chunks.push_back(chunk); + d->chunks.push_back(chunk); } } diff --git a/taglib/toolkit/tbytevector.cpp b/taglib/toolkit/tbytevector.cpp index c65962da..909a2aae 100644 --- a/taglib/toolkit/tbytevector.cpp +++ b/taglib/toolkit/tbytevector.cpp @@ -277,15 +277,15 @@ long double toFloat80(const ByteVector &v, size_t offset) const int exponent = ((bytes[0] & 0x7F) << 8) | bytes[1]; // 64-bit fraction. Leading 1 is explicit. - const ulonglong fraction - = (static_cast(bytes[2]) << 56) - | (static_cast(bytes[3]) << 48) - | (static_cast(bytes[4]) << 40) - | (static_cast(bytes[5]) << 32) - | (static_cast(bytes[6]) << 24) - | (static_cast(bytes[7]) << 16) - | (static_cast(bytes[8]) << 8) - | (static_cast(bytes[9])); + const unsigned long long fraction + = (static_cast(bytes[2]) << 56) + | (static_cast(bytes[3]) << 48) + | (static_cast(bytes[4]) << 40) + | (static_cast(bytes[5]) << 32) + | (static_cast(bytes[6]) << 24) + | (static_cast(bytes[7]) << 16) + | (static_cast(bytes[8]) << 8) + | (static_cast(bytes[9])); long double val; if(exponent == 0 && fraction == 0) @@ -384,12 +384,12 @@ ByteVector ByteVector::fromFloat32BE(float value) ByteVector ByteVector::fromFloat64LE(double value) { - return fromFloat(value); + return fromFloat(value); } ByteVector ByteVector::fromFloat64BE(double value) { - return fromFloat(value); + return fromFloat(value); } //////////////////////////////////////////////////////////////////////////////// @@ -756,12 +756,12 @@ float ByteVector::toFloat32BE(size_t offset) const double ByteVector::toFloat64LE(size_t offset) const { - return toFloat(*this, offset); + return toFloat(*this, offset); } double ByteVector::toFloat64BE(size_t offset) const { - return toFloat(*this, offset); + return toFloat(*this, offset); } long double ByteVector::toFloat80LE(size_t offset) const diff --git a/taglib/toolkit/tutils.h b/taglib/toolkit/tutils.h index 0655342a..9855ed91 100644 --- a/taglib/toolkit/tutils.h +++ b/taglib/toolkit/tutils.h @@ -134,7 +134,7 @@ namespace TagLib /*! * Reverses the order of bytes in an 64-bit integer. */ - inline ulonglong byteSwap(ulonglong x) + inline unsigned long long byteSwap(unsigned long long x) { #if defined(HAVE_BOOST_BYTESWAP)