Skip to content

Commit

Permalink
GuideGrid: fix coverity ID 1023903 Uninitialized pointer field
Browse files Browse the repository at this point in the history
In GuideGrid::GuideGrid(): Several fields are not initialized in the
constructor.
  • Loading branch information
Paul Harrison committed Jun 12, 2013
1 parent 5f54e09 commit 7e7ccf2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
49 changes: 29 additions & 20 deletions mythtv/programs/mythfrontend/guidegrid.cpp
Expand Up @@ -224,28 +224,39 @@ GuideGrid::GuideGrid(MythScreenStack *parent,
TV *player, bool embedVideo,
bool allowFinder, int changrpid)
: ScheduleCommon(parent, "guidegrid"),
m_allowFinder(allowFinder),
m_player(player),
m_usingNullVideo(false), m_embedVideo(embedVideo),
m_previewVideoRefreshTimer(new QTimer(this)),
m_updateTimer(NULL),
m_jumpToChannelLock(QMutex::Recursive),
m_jumpToChannel(NULL)
m_selectRecThreshold(gCoreContext->GetNumSetting("SelChangeRecThreshold", 16)),
m_allowFinder(allowFinder),
m_currentStartChannel(0),
m_startChanID(chanid),
m_startChanNum(channum),
m_currentRow(0),
m_currentCol(0),
m_sortReverse(gCoreContext->GetNumSetting("EPGSortReverse", 0)),
m_channelCount(5),
m_timeCount(30),
m_verticalLayout(false),
m_player(player),
m_usingNullVideo(false),
m_embedVideo(embedVideo),
m_previewVideoRefreshTimer(new QTimer(this)),
m_channelOrdering(gCoreContext->GetSetting("ChannelOrdering", "channum")),
m_updateTimer(NULL),
m_changrpid(changrpid),
m_changrplist(ChannelGroup::GetChannelGroups(false)),
m_jumpToChannelLock(QMutex::Recursive),
m_jumpToChannel(NULL),
m_timeList(NULL),
m_channelList(NULL),
m_guideGrid(NULL),
m_dateText(NULL),
m_longdateText(NULL),
m_jumpToText(NULL),
m_changroupname(NULL),
m_channelImage(NULL)
{
connect(m_previewVideoRefreshTimer, SIGNAL(timeout()),
this, SLOT(refreshVideo()));

m_channelCount = 5;
m_timeCount = 30;
m_currentStartChannel = 0;
m_changrpid = changrpid;
m_changrplist = ChannelGroup::GetChannelGroups(false);

m_sortReverse = gCoreContext->GetNumSetting("EPGSortReverse", 0);
m_selectRecThreshold = gCoreContext->GetNumSetting("SelChangeRecThreshold", 16);

m_channelOrdering = gCoreContext->GetSetting("ChannelOrdering", "channum");

for (uint i = 0; i < MAX_DISPLAY_CHANS; i++)
m_programs.push_back(NULL);

Expand All @@ -263,8 +274,6 @@ GuideGrid::GuideGrid(MythScreenStack *parent,
int secsoffset = -((m_originalStartTime.time().minute() % 30) * 60 +
m_originalStartTime.time().second());
m_currentStartTime = m_originalStartTime.addSecs(secsoffset);
m_startChanID = chanid;
m_startChanNum = channum;
}

bool GuideGrid::Create()
Expand Down
1 change: 0 additions & 1 deletion mythtv/programs/mythfrontend/guidegrid.h
Expand Up @@ -194,7 +194,6 @@ class GuideGrid : public ScheduleCommon, public JumpToChannelListener
void updateDateText(void);

private:
bool m_selectChangesChannel;
int m_selectRecThreshold;

bool m_allowFinder;
Expand Down

0 comments on commit 7e7ccf2

Please sign in to comment.