From patchwork Wed Aug 4 10:21:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 13192 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id DC369C3235 for ; Wed, 4 Aug 2021 10:22:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5C4B2687B6; Wed, 4 Aug 2021 12:22:02 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hzN4Rx/2"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 80FBD6026E for ; Wed, 4 Aug 2021 12:22:00 +0200 (CEST) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1223524F; Wed, 4 Aug 2021 12:22:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1628072520; bh=SnG992zSpfeS9Jqz0gbAK3AXC2vIKxG33v6wbZBnxhQ=; h=From:To:Cc:Subject:Date:From; b=hzN4Rx/2YQSz1hArx96CC9aEmqvihLyB1NP+XkK4LQBE8LGCLrstzTcRmisUIJ97F t6ESqAWdJwD2+tYxOx2N4MDlJ8lioF+IjmsX9WQ4m2oePPPBHoiOC9bTUTmYpLfIU4 3yHRE+KHDfbtmcb87wV+jtHrDB4eg79ggayXcLHY= From: Kieran Bingham To: libcamera devel Date: Wed, 4 Aug 2021 11:21:56 +0100 Message-Id: <20210804102156.4636-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] utils: ipc: Initialise ThreadProxy X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The ThreadProxy IPA template does not implement a constructor and the default compiler generated constructor does not initialise the private ipa_ pointer. Whilst this should not be expected to be used while uninitialised, it does get caught by static analysis for every IPA module constructed, so lets be clean and fix it. Reported-by: Coverity CID=350116 Reported-by: Coverity CID=350123 Reported-by: Coverity CID=350140 Reported-by: Coverity CID=350147 Fixes: 7832e19a599e ("utils: ipc: add templates for code generation for IPC mechanism") Signed-off-by: Kieran Bingham Reviewed-by: Paul Elder Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart --- .../generators/libcamera_templates/module_ipa_proxy.h.tmpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl index ae168548492c..c222f5f204df 100644 --- a/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl +++ b/utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl @@ -72,6 +72,11 @@ private: class ThreadProxy : public Object { public: + ThreadProxy() + : ipa_(nullptr) + { + } + void setIPA({{interface_name}} *ipa) { ipa_ = ipa;