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 <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10399>
This commit is contained in:
Vinson Lee
2021-04-21 19:17:15 -07:00
parent 656c30ac59
commit 3cd5e1b40f
2 changed files with 5 additions and 0 deletions
@@ -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))
@@ -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);