summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-07-13 12:01:31 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-05 08:53:48 +0100
commit25e0c2b7aaba203e34e92e9d2a89e73bfb0b67c3 (patch)
tree387ebb50d01d1349ab692f1f22bbbc798b9c87d1
parent623de9c6d0267e1431ca1473e8a7344d0f6db68f (diff)
utils: ipc: Initialise ThreadProxy
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") Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--utils/ipc/generators/libcamera_templates/module_ipa_proxy.h.tmpl5
1 files changed, 5 insertions, 0 deletions
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 ae168548..c222f5f2 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;