[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kblocks] /: Fix Coverity #76273: Uninitialized members
From:       Julian Helfferich <julian.helfferich () googlemail ! com>
Date:       2016-04-21 2:56:13
Message-ID: E1at4mr-0003nr-7C () scm ! kde ! org
[Download RAW message or body]

Git commit 75ddf0f454db8eb4dbee9b41f92e873afacba26a by Julian Helfferich.
Committed on 21/04/2016 at 02:53.
Pushed by helfferich into branch 'master'.

Fix Coverity #76273: Uninitialized members

Pointer maGameList is not initialized in the constructor of
GameLogicInterface. This class is an abstract base class and the pointer
is initialized in the constructor of the only child class.

Nonetheless, I have now set the pointer to nullptr in the initializer
list of GameLogicInterface.

M  +1    -1    GameLogicInterface.h

http://commits.kde.org/kblocks/75ddf0f454db8eb4dbee9b41f92e873afacba26a

diff --git a/GameLogicInterface.h b/GameLogicInterface.h
index eaf588a..ae5f185 100644
--- a/GameLogicInterface.h
+++ b/GameLogicInterface.h
@@ -15,7 +15,7 @@
 class GameLogicInterface
 {
 public:
-    GameLogicInterface() {};
+    GameLogicInterface() : maGameList(nullptr) {};
     virtual ~GameLogicInterface() {};
 =

 public:
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic