Commit 6c7946ce authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Fix miscellaneous code warnings

libk3bdevice/k3bcdtext.cpp:878: warning: comparison of integer
  expressions of different signedness: 'unsigned int' and 'int'
libk3bdevice/k3bcdtext.cpp:886: warning: comparison of integer
  expressions of different signedness: 'unsigned int' and 'int'

libk3bdevice/k3bdevice.cpp:793: warning: logical 'or' of equal expressions

plugins/decoder/mp3/k3bmad.h:74: warning: 'K3bMad::m_madStructuresInitialized'
  will be initialized after
plugins/decoder/mp3/k3bmad.h:67: warning: 'mad_stream* K3bMad::madStream'
plugins/decoder/mp3/k3bmad.cpp:15: warning: when initialized here

src/rip/k3bpatternparser.h:46: warning: 'void K3b::replaceControlCharacters(QString&)'
  declared 'static' but never defined
parent aa32b934
......@@ -830,8 +830,8 @@ QByteArray K3b::Device::CdText::Private::createPackData( int packType, int& pack
int dataFill = 0;
QByteArray text = encodeCdText( textForPackType( packType, 0 ) );
int currentTrack = 0;
unsigned int textPos = 0;
unsigned int packPos = 0;
int textPos = 0;
int packPos = 0;
//
// initialize the first pack
......
......@@ -790,7 +790,7 @@ int K3b::Device::Device::numSessions() const
else if ( m & ( MEDIA_DVD_PLUS_RW|MEDIA_DVD_RW_OVWR|MEDIA_BD_RE ) ) {
// fabricate value
int e = isEmpty();
return ( e == STATE_COMPLETE || e == STATE_COMPLETE ? 1 : 0 );
return ( e == STATE_COMPLETE ? 1 : 0 );
}
else {
if( readDiscInformation( data ) ) {
......
......@@ -13,11 +13,11 @@ static const int INPUT_BUFFER_SIZE = 5*8192;
K3bMad::K3bMad()
: m_madStructuresInitialized(false),
madStream(NULL),
: madStream(NULL),
madFrame(NULL),
madSynth(NULL),
madTimer(NULL),
m_madStructuresInitialized(false),
m_bInputError(false)
{
madStream = new mad_stream;
......
......@@ -19,6 +19,13 @@
#include <QStack>
#include <QDebug>
static void replaceControlCharacters( QString& s )
{
s.replace( '/', '_' );
s.replace( '*', '_' );
s.replace( '}', '*' ); // for conditional inclusion
}
QString K3b::PatternParser::parsePattern( const KCDDB::CDInfo& entry,
int trackNumber,
const QString& extension,
......@@ -309,10 +316,3 @@ QString K3b::PatternParser::parsePattern( const KCDDB::CDInfo& entry,
return dir;
}
void K3b::replaceControlCharacters( QString& s )
{
s.replace( '/', '_' );
s.replace( '*', '_' );
s.replace( '}', '*' ); // for conditional inclusion
}
......@@ -42,8 +42,6 @@ namespace K3b {
EXTENSION = 'e'
};
};
static void replaceControlCharacters(QString& s);
}
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment