Skip to content

Commit

Permalink
Fixes for various minor cppcheck warnings.
Browse files Browse the repository at this point in the history
This touches a some libmythbase interfaces so the plugins need recompiling.
  • Loading branch information
daniel-kristjansson committed Jan 28, 2012
1 parent 1ed67c1 commit b0b97b3
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmyth/audio/audiooutputbase.cpp
Expand Up @@ -112,8 +112,8 @@ AudioOutputBase::AudioOutputBase(const AudioSettings &settings) :
{
src_in = (float *)AOALIGN(src_in_buf);
memset(&src_data, 0, sizeof(SRC_DATA));
memset(src_in, 0, sizeof(float) * kAudioSRCInputSize);
memset(audiobuffer, 0, sizeof(char) * kAudioRingBufferSize);
memset(src_in_buf, 0, sizeof(src_in_buf));
memset(audiobuffer, 0, sizeof(audiobuffer));

// Handle override of SRC quality settings
if (gCoreContext->GetNumSetting("SRCQualityOverride", false))
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmyth/mythdialogs.cpp
Expand Up @@ -975,12 +975,12 @@ MythThemedDialog::MythThemedDialog(MythMainWindow *parent,
}
}

MythThemedDialog::MythThemedDialog(MythMainWindow *parent, const char* name,
bool setsize)
: MythDialog(parent, name, setsize)
MythThemedDialog::MythThemedDialog(
MythMainWindow *parent, const char* name, bool setsize) :
MythDialog(parent, name, setsize), widget_with_current_focus(NULL),
theme(NULL), context(-1)
{
setNoErase();
theme = NULL;
}

bool MythThemedDialog::loadThemedWindow(QString window_name,
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmyth/mythwidgets.cpp
Expand Up @@ -1344,7 +1344,7 @@ void MythListBox::setCurrentItem(const QString& matchText, bool caseSensitive,
void MythListBox::HandleItemSelectionChanged(void)
{
QList<QListWidgetItem*> items = QListWidget::selectedItems();
int row = index(items);
int row = getIndex(items);
if (row >= 0)
emit highlighted(row);
}
Expand Down Expand Up @@ -1520,7 +1520,7 @@ void MythListBox::changeItem(const QString &new_text, uint row)
widget->setText(new_text);
}

int MythListBox::index(const QList<QListWidgetItem*> &list)
int MythListBox::getIndex(const QList<QListWidgetItem*> &list)
{
return (list.empty()) ? -1 : row(list[0]);
}
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmyth/mythwidgets.h
Expand Up @@ -394,7 +394,7 @@ class MPUBLIC MythListBox: public QListWidget
void insertStringList(const QStringList&);
void removeRow(uint row);
void changeItem(const QString&, uint row);
int index(const QList<QListWidgetItem*>&);
int getIndex(const QList<QListWidgetItem*>&);
QList<QListWidgetItem*> findItems(
const QString &text, Qt::MatchFlags flags = Qt::MatchStartsWith) const
{
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/lcddevice.cpp
Expand Up @@ -476,7 +476,7 @@ void LCD::setTunerLEDs(enum LCDTunerSet tuner, bool on)
sendToServer(QString("UPDATE_LEDS %1").arg(lcd_ledmask));
}

void LCD::setChannelProgress(const QString time, float value)
void LCD::setChannelProgress(const QString &time, float value)
{
if (!lcd_ready || !lcd_showchannel)
return;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/lcddevice.h
Expand Up @@ -234,7 +234,7 @@ class MBASE_PUBLIC LCD : public QObject, public MythSocketCBs
// While watching Live/Recording/Pause Buffer, occasionaly describe how
// much of the program has been seen (between 0.0 and 1.0)
// (e.g. [current time - start time] / [end time - start time] )
void setChannelProgress(const QString time, float percentViewed);
void setChannelProgress(const QString &time, float percentViewed);

// Show the Menu
// QPtrList is a pointer to a bunch of menu items
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythversion.h
Expand Up @@ -12,7 +12,7 @@
/// Update this whenever the plug-in API changes.
/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
/// libmythui class methods used by plug-ins.
#define MYTH_BINARY_VERSION "0.25.20120127-1"
#define MYTH_BINARY_VERSION "0.25.20120128-1"

/** \brief Increment this whenever the MythTV network protocol changes.
*
Expand Down
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/cetonrtsp.cpp
Expand Up @@ -21,7 +21,8 @@ CetonRTSP::CetonRTSP(const QString &ip, uint tuner, ushort port) :
_port(port),
_tuner(tuner),
_sequenceNumber(0),
_sessionNumber(0)
_sessionNumber(0),
_responseCode(-1)
{
_requestUrl = QString("rtsp://%1:%2/cetonmpeg%3")
.arg(ip).arg(port).arg(tuner);
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/hdhrchannel.cpp
Expand Up @@ -147,7 +147,7 @@ static QString format_dvbc(const DTVMultiplex &tuning, const QString &mod)
}

static QString get_tune_spec(
const DTVTunerType tunerType, const DTVMultiplex &tuning)
const DTVTunerType &tunerType, const DTVMultiplex &tuning)
{
const QString mod = format_modulation(tuning);

Expand Down
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/mythraopconnection.cpp
Expand Up @@ -23,7 +23,8 @@ RSA* MythRAOPConnection::g_rsa = NULL;

MythRAOPConnection::MythRAOPConnection(QObject *parent, QTcpSocket *socket,
QByteArray id, int port)
: QObject(parent), m_watchdogTimer(NULL), m_socket(socket), m_hardwareId(id),
: QObject(parent), m_watchdogTimer(NULL), m_socket(socket),
m_textStream(NULL), m_hardwareId(id),
m_dataPort(port), m_dataSocket(NULL),
m_clientControlSocket(NULL), m_clientControlPort(0),
m_audio(NULL), m_codec(NULL), m_codeccontext(NULL),
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/mythraopconnection.h
Expand Up @@ -84,7 +84,6 @@ class MythRAOPConnection : public QObject
AVCodecContext *m_codeccontext;
QList<int> m_audioFormat;
int m_sampleRate;
int m_framesPerPacket;
QMap<uint64_t, int16_t*> m_audioQueue;
bool m_allowVolumeControl;
// audio/packet sync
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/recordingquality.cpp
Expand Up @@ -13,6 +13,7 @@ static double score_gaps(const ProgramInfo*, const RecordingGaps&);
RecordingQuality::RecordingQuality(
const ProgramInfo *pi, const RecordingGaps &rg,
const QDateTime &first, const QDateTime &latest) :
m_continuity_error_count(0), m_packet_count(0),
m_overall_score(1.0), m_recording_gaps(rg)
{
if (!pi)
Expand Down

0 comments on commit b0b97b3

Please sign in to comment.