From patchwork Thu Jan 17 20:20:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 257 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 102D560B2D for ; Thu, 17 Jan 2019 21:20:49 +0100 (CET) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 70B2C558; Thu, 17 Jan 2019 21:20:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547756448; bh=/wol2C7SFb/6v3zR6PILBgk5x6EO0TLGLvwQnvpbflM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PWC3bWNvOiSLBGI9HnwkA5lVsGPF95AfgfxhuG8PkT6dZV8ITjiTWMJZBAmku9gz6 99pR15/hwMB7f/v0Ow8vYaUkXEVcBJ/bJt5UY4JHrd/bc9UwqmHXObr+LevFo24mqV odsr+8B1foNjPGvbS+/ac6+aKgZU38A6/fM3Kn7o= From: Kieran Bingham To: LibCamera Devel Date: Thu, 17 Jan 2019 20:20:39 +0000 Message-Id: <20190117202043.21420-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190117202043.21420-1-kieran.bingham@ideasonboard.com> References: <20190117202043.21420-1-kieran.bingham@ideasonboard.com> Subject: [libcamera-devel] [PATCH 1/5] test: timer: Initialise all variables X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 20:20:49 -0000 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") Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- test/timer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/timer.cpp b/test/timer.cpp index 6a3cda70bef4..3d1a78ac2768 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); }