Fix some warnings in non-debug mode.

git-svn-id: svn://localhost/ardour2/branches/3.0@12047 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-04-20 21:59:37 +00:00
parent f13ff1e10b
commit 9cc110f111
8 changed files with 24 additions and 12 deletions

View file

@ -207,8 +207,9 @@ void ID3v1::Tag::read()
// some initial sanity checking
if(data.size() == 128 && data.startsWith("TAG"))
parse(data);
else
else {
debug("ID3v1 tag is not valid or could not be read at the specified offset.");
}
}
}

View file

@ -431,8 +431,9 @@ void ID3v2::Tag::parse(const ByteVector &origData)
// portion of the frame data.
if(data.at(frameDataPosition) == 0) {
if(d->header.footerPresent())
if(d->header.footerPresent()) {
debug("Padding *and* a footer found. This is not allowed by the spec.");
}
d->paddingSize = frameDataLength - frameDataPosition;
return;

View file

@ -256,8 +256,9 @@ void Ogg::FLAC::File::scan()
d->hasXiphComment = true;
d->commentPacket = ipacket;
}
else if(blockType > 5)
else if(blockType > 5) {
debug("Ogg::FLAC::File::scan() -- Unknown metadata block");
}
}

View file

@ -151,8 +151,9 @@ ByteVectorList Ogg::Page::packets() const
for(; it != packetSizes.end(); ++it)
l.append(d->file->readBlock(*it));
}
else
else {
debug("Ogg::Page::packets() -- attempting to read packets from an invalid page.");
}
return l;
}
@ -173,8 +174,9 @@ ByteVector Ogg::Page::render() const
d->file->seek(d->packetOffset);
data.append(d->file->readBlock(d->dataSize));
}
else
else {
debug("Ogg::Page::render() -- this page is empty!");
}
}
else {
ByteVectorList::ConstIterator it = d->packets.begin();

View file

@ -161,10 +161,12 @@ void Speex::Properties::read()
if(start >= 0 && end >= 0 && d->sampleRate > 0)
d->length = (int) ((end - start) / (long long) d->sampleRate);
else
else {
debug("Speex::Properties::read() -- Either the PCM values for the start or "
"end of this file was incorrect or the sample rate is zero.");
}
}
else
else {
debug("Speex::Properties::read() -- Could not find valid first and last Ogg pages.");
}
}

View file

@ -174,10 +174,12 @@ void Vorbis::Properties::read()
if(start >= 0 && end >= 0 && d->sampleRate > 0)
d->length = (end - start) / (long long) d->sampleRate;
else
else {
debug("Vorbis::Properties::read() -- Either the PCM values for the start or "
"end of this file was incorrect or the sample rate is zero.");
}
}
else
else {
debug("Vorbis::Properties::read() -- Could not find valid first and last Ogg pages.");
}
}

View file

@ -114,8 +114,9 @@ File::FilePrivate::FilePrivate(FileName fileName) :
else
file = fopen(name, "rb");
if(!file)
if(!file) {
debug("Could not open file " + String((const char *) name));
}
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -232,8 +232,9 @@ std::string String::to8Bit(bool unicode) const
&target, targetBuffer + outputBufferSize,
Unicode::lenientConversion);
if(result != Unicode::conversionOK)
if(result != Unicode::conversionOK) {
debug("String::to8Bit() - Unicode conversion error.");
}
int newSize = target - targetBuffer;
s.resize(newSize);
@ -728,8 +729,9 @@ void String::prepare(Type t)
&target, targetBuffer + bufferSize,
Unicode::lenientConversion);
if(result != Unicode::conversionOK)
if(result != Unicode::conversionOK) {
debug("String::prepare() - Unicode conversion error.");
}
int newSize = target != targetBuffer ? target - targetBuffer - 1 : 0;