Skip to content

Commit

Permalink
Fix some minor issues discovered by cppcheck.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Aug 22, 2011
1 parent 8dab78c commit 17c45c0
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 13 deletions.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/asirecorder.cpp
Expand Up @@ -31,7 +31,8 @@
#define LOC QString("ASIRec(%1): ").arg(tvrec->GetCaptureCardNum())

ASIRecorder::ASIRecorder(TVRec *rec, ASIChannel *channel) :
DTVRecorder(rec), m_channel(channel), m_stream_handler(NULL)
DTVRecorder(rec), m_channel(channel), m_stream_handler(NULL),
m_record_mpts(false)
{
SetStreamData(new MPEGStreamData(-1,false));
if (channel->GetProgramNumber() < 0 || !channel->GetMinorChannel())
Expand Down
10 changes: 8 additions & 2 deletions mythtv/libs/libmythtv/dbchannelinfo.cpp
Expand Up @@ -17,9 +17,15 @@
#include "channelgroup.h"
#include "sourceutil.h"

DBChannel::DBChannel(const DBChannel &other)
DBChannel::DBChannel(const DBChannel &other) :
channum(other.channum), callsign(other.callsign),
name(other.name), icon(other.icon),
chanid(other.chanid),
major_chan(other.major_chan), minor_chan(other.minor_chan),
mplexid((other.mplexid == 32767) ? 0 : other.mplexid),
sourceid(other.sourceid), cardid (other.cardid),
grpid(other.grpid), visible(other.visible)
{
(*this) = other;
}

DBChannel::DBChannel(
Expand Down
21 changes: 19 additions & 2 deletions mythtv/libs/libmythtv/dtvmultiplex.cpp
Expand Up @@ -6,6 +6,25 @@

#define LOC QString("DTVMux: ")

DTVMultiplex::DTVMultiplex(const DTVMultiplex &other) :
frequency(other.frequency),
symbolrate(other.symbolrate),
inversion(other.inversion),
bandwidth(other.bandwidth),
hp_code_rate(other.hp_code_rate),
lp_code_rate(other.lp_code_rate),
modulation(other.modulation),
trans_mode(other.trans_mode),
guard_interval(other.guard_interval),
hierarchy(other.hierarchy),
polarity(other.polarity),
fec(other.fec),
mod_sys(other.mod_sys),
rolloff(other.rolloff),
mplex(other.mplex),
sistandard(other.sistandard)
{
}

DTVMultiplex &DTVMultiplex::operator=(const DTVMultiplex &other)
{
Expand All @@ -25,7 +44,6 @@ DTVMultiplex &DTVMultiplex::operator=(const DTVMultiplex &other)
rolloff = other.rolloff;
mplex = other.mplex;
sistandard = other.sistandard;
sistandard.detach();
return *this;
}

Expand Down Expand Up @@ -324,7 +342,6 @@ bool DTVMultiplex::FillFromDB(DTVTunerType type, uint mplexid)

mplex = mplexid;
sistandard = query.value(13).toString();
sistandard.detach();

// Parse the query into our DVBTuning class
return ParseTuningParams(
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/dtvmultiplex.h
Expand Up @@ -24,7 +24,7 @@ class DTVMultiplex
public:
DTVMultiplex()
: frequency(0), symbolrate(0), mplex(0), sistandard(QString::null) { }
DTVMultiplex(const DTVMultiplex &other) { (*this) = other; }
DTVMultiplex(const DTVMultiplex &other);
DTVMultiplex &operator=(const DTVMultiplex &other);
virtual ~DTVMultiplex() { }

Expand Down
6 changes: 5 additions & 1 deletion mythtv/libs/libmythtv/recordinginfo.h
Expand Up @@ -29,7 +29,11 @@ typedef AutoDeleteDeque<RecordingInfo*> RecordingList;
class MTV_PUBLIC RecordingInfo : public ProgramInfo
{
public:
RecordingInfo(void) : record(NULL) {}
RecordingInfo(void) :
oldrecstatus(rsUnknown),
savedrecstatus(rsUnknown),
future(false),
record(NULL) {}
RecordingInfo(const RecordingInfo &other) :
ProgramInfo(other),
oldrecstatus(other.oldrecstatus),
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/ringbuffer.h
Expand Up @@ -214,7 +214,6 @@ class MTV_PUBLIC RingBuffer : protected MThread
bool ateof; // protected by rwlock
bool readsallowed; // protected by rwlock
bool setswitchtonext; // protected by rwlock
bool ignorereadahead; // protected by rwlock
uint rawbitrate; // protected by rwlock
float playspeed; // protected by rwlock
int fill_threshold; // protected by rwlock
Expand Down
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/signalmonitor.cpp
Expand Up @@ -175,11 +175,11 @@ SignalMonitor *SignalMonitor::Init(QString cardtype, int db_cardnum,
SignalMonitor::SignalMonitor(int _capturecardnum, ChannelBase *_channel,
uint64_t wait_for_mask)
: MThread("SignalMonitor"),
channel(_channel),
channel(_channel), pParent(NULL),
capturecardnum(_capturecardnum), flags(wait_for_mask),
update_rate(25), minimum_update_rate(5),
update_done(false), notify_frontend(true),
eit_scan(false),
eit_scan(false), tablemon(false),
signalLock (QObject::tr("Signal Lock"), "slock",
1, true, 0, 1, 0),
signalStrength(QObject::tr("Signal Power"), "signal",
Expand Down
3 changes: 0 additions & 3 deletions mythtv/libs/libmythtv/signalmonitor.h
Expand Up @@ -201,9 +201,6 @@ class SignalMonitor : protected MThread
bool eit_scan;
QString error;

MythTimer m_channelTimer;
int m_channelTimeout;

SignalMonitorValue signalLock;
SignalMonitorValue signalStrength;
SignalMonitorValue scriptStatus;
Expand Down

0 comments on commit 17c45c0

Please sign in to comment.