From b523982920d656eabe574c066e09483cb511575a Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Thu, 17 Jan 2019 14:06:46 +0000 Subject: test: timer: Initialise all variables The ManagedTimer does not initialise the integer 'interval_' variable. This is set before used, and should not break - but for completeness (and to cover static analysers) initialise the variable in the initialiser list. Fixes: 034ea868027d ("test: Add timer test") Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- test/timer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/timer.cpp') diff --git a/test/timer.cpp b/test/timer.cpp index 6a3cda70..e47cb21b 100644 --- a/test/timer.cpp +++ b/test/timer.cpp @@ -19,7 +19,8 @@ using namespace libcamera; class ManagedTimer : public Timer { public: - ManagedTimer() : Timer() + ManagedTimer() + : Timer(), interval_(0) { timeout.connect(this, &ManagedTimer::timeoutHandler); } -- cgit v1.2.1