Initialize every variable possibly used without initialization.
From: Erik Hovland <erik@hovland.org>
---
libs/libmythui/mythpainter.h | 2 +-
libs/libmythui/mythpainter_ogl.cpp | 8 +++----
libs/libmythui/mythpainter_ogl.h | 1 -
libs/libmythui/mythpainter_qt.cpp | 7 ++----
libs/libmythui/mythpainter_qt.h | 1 -
libs/libmythui/myththemedmenu.cpp | 43 ++++++++++++++----------------------
6 files changed, 23 insertions(+), 39 deletions(-)
diff --git a/libs/libmythui/mythpainter.h b/libs/libmythui/mythpainter.h
index 23ad65f..071793d 100644
a
|
b
|
class MythImage; |
15 | 15 | class MythPainter |
16 | 16 | { |
17 | 17 | public: |
18 | | MythPainter() { } |
| 18 | MythPainter() : m_Parent(0) { } |
19 | 19 | virtual ~MythPainter() { } |
20 | 20 | |
21 | 21 | virtual QString GetName(void) = 0; |
diff --git a/libs/libmythui/mythpainter_ogl.cpp b/libs/libmythui/mythpainter_ogl.cpp
index 672ea70..91237ad 100644
a
|
b
|
using namespace std; |
37 | 37 | #endif |
38 | 38 | |
39 | 39 | MythOpenGLPainter::MythOpenGLPainter() |
40 | | : MythPainter() |
41 | | { |
42 | | } |
43 | | |
44 | | MythOpenGLPainter::~MythOpenGLPainter() |
| 40 | : MythPainter() |
| 41 | , q_gl_texture(-1), texture_rects(false) |
| 42 | , m_maxTexDim(-1) |
45 | 43 | { |
46 | 44 | } |
47 | 45 | |
diff --git a/libs/libmythui/mythpainter_ogl.h b/libs/libmythui/mythpainter_ogl.h
index 7713b23..731301b 100644
a
|
b
|
class MythOpenGLPainter : public MythPainter |
11 | 11 | { |
12 | 12 | public: |
13 | 13 | MythOpenGLPainter(); |
14 | | ~MythOpenGLPainter(); |
15 | 14 | |
16 | 15 | virtual QString GetName(void) { return QString("OpenGL"); } |
17 | 16 | virtual bool SupportsAnimation(void) { return true; } |
diff --git a/libs/libmythui/mythpainter_qt.cpp b/libs/libmythui/mythpainter_qt.cpp
index 2072d48..4451988 100644
a
|
b
|
void MythQtImage::SetChanged(bool change) |
29 | 29 | } |
30 | 30 | |
31 | 31 | MythQtPainter::MythQtPainter() |
32 | | : MythPainter() |
33 | | { |
34 | | } |
35 | | |
36 | | MythQtPainter::~MythQtPainter() |
| 32 | : MythPainter() |
| 33 | , painter(0) |
37 | 34 | { |
38 | 35 | } |
39 | 36 | |
diff --git a/libs/libmythui/mythpainter_qt.h b/libs/libmythui/mythpainter_qt.h
index 4b1f904..36aa9f6 100644
a
|
b
|
class MythQtPainter : public MythPainter |
15 | 15 | { |
16 | 16 | public: |
17 | 17 | MythQtPainter(); |
18 | | ~MythQtPainter(); |
19 | 18 | |
20 | 19 | virtual QString GetName(void) { return QString("Qt"); } |
21 | 20 | virtual bool SupportsAnimation(void) { return false; } |
diff --git a/libs/libmythui/myththemedmenu.cpp b/libs/libmythui/myththemedmenu.cpp
index ddfaaa9..a48f447 100644
a
|
b
|
class MythThemedMenuPrivate: public XMLParseBase |
246 | 246 | ///////////////////////////////////////////////////////////////////////////// |
247 | 247 | |
248 | 248 | MythThemedMenuState::MythThemedMenuState() |
| 249 | : logo(0), buttonnormal(0) |
| 250 | , buttonactive(0), callback(0) |
| 251 | , callbackdata(0), killable(false) |
| 252 | , balancerows(true), spreadbuttons(false) |
| 253 | , buttoncenter(false), buttonBackground(0) |
| 254 | , uparrow(0), downarrow(0) |
| 255 | , allowreorder(true), maxColumns(-1) |
| 256 | , visiblerowlimit(-1), loaded(false) |
249 | 257 | { |
250 | | allowreorder = true; |
251 | | balancerows = true; |
252 | | |
253 | | logo = NULL; |
254 | | buttonnormal = NULL; |
255 | | buttonactive = NULL; |
256 | | uparrow = NULL; |
257 | | downarrow = NULL; |
258 | | buttonBackground = NULL; |
259 | | |
260 | | loaded = false; |
261 | | |
262 | | callback = NULL; |
263 | | |
264 | | killable = false; |
265 | 258 | } |
266 | 259 | |
267 | 260 | MythThemedMenuState::~MythThemedMenuState() |
… |
… |
bool MythThemedMenuState::parseSettings( |
1283 | 1276 | MythThemedMenuPrivate::MythThemedMenuPrivate(MythThemedMenu *lparent, |
1284 | 1277 | const char *cdir, |
1285 | 1278 | MythThemedMenuState *lstate) |
| 1279 | : parent(lparent), m_state(lstate) |
| 1280 | , allocedstate(false), activebutton(0) |
| 1281 | , currentrow(-1), currentcolumn(-1) |
| 1282 | , foundtheme(false), exitModifier(-1) |
| 1283 | , ignorekeys(false), maxrows(-1) |
| 1284 | , visiblerows(-1), columns(-1) |
| 1285 | , wantpop(false), watermark(0) |
| 1286 | , uparrow(0), downarrow(0) |
1286 | 1287 | { |
1287 | | if (!lstate) |
| 1288 | if (!m_state) |
1288 | 1289 | { |
1289 | 1290 | m_state = new MythThemedMenuState(); |
1290 | 1291 | allocedstate = true; |
1291 | 1292 | } |
1292 | | else |
1293 | | { |
1294 | | m_state = lstate; |
1295 | | allocedstate = false; |
1296 | | } |
1297 | | |
1298 | | parent = lparent; |
1299 | | ignorekeys = false; |
1300 | | wantpop = false; |
1301 | | exitModifier = -1; |
1302 | 1293 | |
1303 | 1294 | m_state->themeDir = cdir; |
1304 | 1295 | } |