summaryrefslogtreecommitdiff
path: root/test/timer.cpp
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2019-01-17 14:06:46 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2019-01-17 21:31:28 +0000
commitb523982920d656eabe574c066e09483cb511575a (patch)
treebaa546c4d44c007573a046e64decdfe2438ba015 /test/timer.cpp
parent2b63efe0928937e95b7ea1374395048f47f803ba (diff)
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 <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/timer.cpp')
-rw-r--r--test/timer.cpp3
1 files changed, 2 insertions, 1 deletions
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);
}