Skip to content
Permalink
Browse files

MythWeather: Fix coverity ID 1026736 Uninitialized pointer field

In Weather::Weather(): A pointer field is not initialized in the constructor.
Also removed a load of unused variables which are no longer required.
  • Loading branch information...
Paul Harrison
Paul Harrison committed Jun 9, 2013
1 parent 64f6b14 commit cb53d4d145df2da00466c675e3dd3cfe758d23c4
Showing with 16 additions and 21 deletions.
  1. +15 −13 mythplugins/mythweather/mythweather/weather.cpp
  2. +1 −8 mythplugins/mythweather/mythweather/weather.h
@@ -21,15 +21,21 @@

Weather::Weather(MythScreenStack *parent, const QString &name, SourceManager *srcMan)
: MythScreenType(parent, name),
m_cur_screen(0)
m_weatherStack(new MythScreenStack(GetMythMainWindow(), "weather stack")),
m_firstRun(true),
m_nextpageInterval(gCoreContext->GetNumSetting("weatherTimeout", 10)),
m_nextpage_Timer(new QTimer(this)),
//m_gotDataHook(false),
m_firstSetup(true),
m_createdSrcMan(false),
m_srcMan(NULL),
m_cur_screen(0),
m_currScreen(NULL),
m_paused(false),
m_pauseText(NULL),
m_headerText(NULL),
m_updatedText(NULL)
{
m_weatherStack = new MythScreenStack(GetMythMainWindow(), "weather stack");

m_paused = false;

m_firstRun = true;
m_firstSetup = true;

if (!srcMan)
{
m_srcMan = new SourceManager();
@@ -47,12 +53,8 @@ Weather::Weather(MythScreenStack *parent, const QString &name, SourceManager *sr
m_createdSrcMan = false;
}

m_pauseText = m_headerText = m_updatedText = NULL;

m_nextpageInterval = gCoreContext->GetNumSetting("weatherTimeout", 10);

m_nextpage_Timer = new QTimer(this);
connect(m_nextpage_Timer, SIGNAL(timeout()), SLOT(nextpage_timeout()) );

m_allScreens = loadScreens();
}

@@ -52,18 +52,11 @@ class Weather : public MythScreenType
void hideScreen(void);

MythScreenStack *m_weatherStack;
int m_timeoutCounter;
int m_wantAnimated;
bool m_stopProcessing;

units_t m_units;
bool m_firstRun;
int m_updateInterval;
int m_nextpageInterval;
int m_nextpageIntArrow;
QTimer *m_nextpage_Timer;

bool m_gotDataHook;
QTimer *m_nextpage_Timer;

bool m_firstSetup;

0 comments on commit cb53d4d

Please sign in to comment.
You can’t perform that action at this time.