From 3cd5e1b40f89799d27d99762bf433469c6bf7373 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 21 Apr 2021 19:17:15 -0700 Subject: [PATCH] clover: Add constructor for constant_argument. Fix defects reported by Coverity Scan. member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize buf. member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st. Signed-off-by: Vinson Lee Reviewed-by: Karol Herbst Part-of: --- src/gallium/frontends/clover/core/kernel.cpp | 3 +++ src/gallium/frontends/clover/core/kernel.hpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/gallium/frontends/clover/core/kernel.cpp b/src/gallium/frontends/clover/core/kernel.cpp index 3f58973ff05..36a81ee04e1 100644 --- a/src/gallium/frontends/clover/core/kernel.cpp +++ b/src/gallium/frontends/clover/core/kernel.cpp @@ -537,6 +537,9 @@ void kernel::local_argument::unbind(exec_context &ctx) { } +kernel::constant_argument::constant_argument() : buf(nullptr), st(nullptr) { +} + void kernel::constant_argument::set(size_t size, const void *value) { if (size != sizeof(cl_mem)) diff --git a/src/gallium/frontends/clover/core/kernel.hpp b/src/gallium/frontends/clover/core/kernel.hpp index 684aefa29ee..a2264376cce 100644 --- a/src/gallium/frontends/clover/core/kernel.hpp +++ b/src/gallium/frontends/clover/core/kernel.hpp @@ -195,6 +195,8 @@ namespace clover { class constant_argument : public argument { public: + constant_argument(); + virtual void set(size_t size, const void *value); virtual void bind(exec_context &ctx, const module::argument &marg);