]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2726] Initialize variables
authorMichal 'vorner' Vaner <vorner@vorner.cz>
Wed, 12 Jun 2013 09:21:56 +0000 (11:21 +0200)
committerMichal 'vorner' Vaner <vorner@vorner.cz>
Wed, 12 Jun 2013 09:21:56 +0000 (11:21 +0200)
src/lib/util/unittests/mock_socketsession.h

index 01ca34f3e62a1e104b03b295daf2b7056d782019..fb155a22dd4e78165b4adf5634bc1187eff23961 100644 (file)
@@ -42,7 +42,12 @@ class MockSocketSessionForwarder :
 public:
     MockSocketSessionForwarder() :
         is_connected_(false), connect_ok_(true), push_ok_(true),
-        close_ok_(true)
+        close_ok_(true),
+        // These are not used until set, but we set them anyway here,
+        // partly to silence cppcheck, and partly to be cleaner. Put some
+        // invalid values in.
+        pushed_sock_(-1), pushed_family_(-1), pushed_type_(-1),
+        pushed_protocol_(-1)
     {}
 
     virtual void connectToReceiver() {